General information
Category:
COM/DCOM and OLE Automation
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only