-
I'm trying to access Bookmarks in Word and place text in the
document at that point. I can get VB6 to open Word and the template I'm using. However, I get an error message telling me I'm not using the syntax correctly.
Can anyone HELP me!!!! PLEASE!!!!
That's the only problem in this program.
-
Any Code?
When vb says there is a syntax error, doesnt that mean that something wasnt spelled correctly?
Maybe you could provide some code?
-
Thanks Jeff,
Here's some code. I'm being told that the object doesn't exist. However the bookmark ("LDate")does exist in the Word .dot file.
'create Word object variable
Set A = CreateObject("Word.Application")
A.Visible = True 'show word
'open a new document
A.Documents.Open _
"C:\Program Files\Microsoft Office\Templates\Proposals\NoBidLtr.dot"
'write text to bookmarks in NoBid template
ActiveDocument.Bookmarks("LDate") = ldate
Thanks for your help. :o
Juanita
[Edited by JuanitaJJS on 06-13-2000 at 03:50 PM]
-
Try changing the last line to
A.ActiveDocument.Bookmarks("LDate").range = ldate
-
Thank you!!
Thank you very much. It worked! I'm somewhat new to Visual Basic but have had other programming languages in college.
Thanks again!
Juanita