Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Word Question
Message
From
08/01/2001 11:58:39
 
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Miscellaneous
Thread ID:
00460585
Message ID:
00460632
Views:
10
Mark:

Not exactly what you are lookimg for but this is _almost_ how I loop through bookmarks in my systems in production

If loOleWord.ActiveDocument.Bookmarks.Exists("LoAddress") Then
loOleWord.ActiveDocument.Bookmarks("LoAddress").Select()
loOleWord.Selection.TypeText(lcText)
EndIf

I say _almost_ because I verify the status of a OleError class property before every automation command. The OleError property value is set in my error handler if an automation error occurs. Can't say the code looks good with all those If This.OleError <> 0 Then statements that pollute the code...

Hope it helps,

Daniel
Previous
Reply
Map
View

Click here to load this message in the networking platform