Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Finding a Word Bookmark via OLE Automation from Visual F
Message
From
26/03/1998 13:50:00
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00087325
Message ID:
00087401
Views:
39
>Cetin,
>
>Thanks for the reply. Are you using WordBasic syntax or Visual Basic syntax? I ask this question because I couldn't find either EditBookmark or EndofDocument in the Word Visual Basic help file for Word 97.
>
>BTW, how do you determine in VB that a bookmark doesn't exist in the document? Can you get a VB function that finds a bookmark to return a True/False value?
>
>Ben Holton
Ben,
It's word.basic syntax and work for both Word95 and 97.
oWord = createobject("word.basic")
* is same as
oWord = createobject("word.application")
with oWord.wordbasic
Word.basic is more reliable. VBA syntax is quite same though. I choose the word.basic as if it works too, if not then VB syntax. With word97, vb syntax got to be more like oop syntax. To find appropriate VB syntax record a dummy macro in Word, then cut and paste it to VFP. Minor modification generally needed such as inserting a "object" (oWord.object.editbookmark instead of oWord.bookmark).
To determine if a bookmark exist :
? oWord.existingbookmark(BookmarkName) (0 - .f. -1 = .t.)
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform