Bookmarks, when transfering data into word

AnnaFoot

Registered User.
Local time
Today, 12:08
Joined
Dec 5, 2000
Messages
51
I have carefully bookmarked my word document, and am then opeing it from access without difficulty. However when i try to use:
doc.editgoto "nameofbookmark"
doc.insert "whatever"

it always enters the information at the beginning of the document. the only way i have been able to change that is by using:
doc.endofdocument
doc.insert "whatever"

and that, of course, enters the info at the end of the document.

is <doc.editgoto> a valid command? is there a recognised problem with the bookmark command in older versions? I'm using office 97.

Thanks for any help...

Anna
 
Hey Anna,

you've done it all right when working like this. I hope you declared doc as Word.Application.
Then you can go on:

doc.Selection.GoTo What:=wdGoToBookmark, Name:="NameOfBookmark"
doc.Selection.InsertAfter Text:="myText"

Mic
 
Thanks for the suggestion Mic, I have got doc declared, but as ("word.basic") not as ("word.application"). I tried changing it but then the line
doc.filenew "pathname" didn't work.
Any other suggestions?

I have solved the overall problem using mailmerge, it is just annoying that i can't seem to get this to work.

Anna
 

Users who are viewing this thread

Back
Top Bottom