|
-
Jun 13th, 2000, 02:55 AM
#1
Thread Starter
New Member
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.
-
Jun 13th, 2000, 03:18 AM
#2
Addicted Member
Any Code?
When vb says there is a syntax error, doesnt that mean that something wasnt spelled correctly?
Maybe you could provide some code?
-
Jun 13th, 2000, 03:31 AM
#3
Thread Starter
New Member
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. 
Juanita
[Edited by JuanitaJJS on 06-13-2000 at 03:50 PM]
-
Jun 13th, 2000, 06:44 AM
#4
Fanatic Member
Try changing the last line to
A.ActiveDocument.Bookmarks("LDate").range = ldate
www.RealisticGraphics.net
Running VS.Net Enterprise & VB 6
Other Languages: JavaScript, VBScript, VBA, HTML, CSS, ASP, SQL, XML
MSN Messenger: kmsheff
-
Jun 13th, 2000, 10:18 PM
#5
Thread Starter
New Member
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|