Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
OLE Automation & MS Word
Message
 
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00803546
Message ID:
00803554
Views:
10
Sorry, had a typo in my range statement.
#Define wdReplaceOne 1
#Define wdTextFrameStory 5  &&word constant

*define range
NewRange = oDoc.StoryRanges(wdTextFrameStory)
With NewRange.Find
  *look for your bookmark in this range
  *this example is looking for text, I haven't done bookmarks
  .text = "!lcText!"
  .MatchCase = .F.
  .Format = .F.
  lFound = .Execute(,,,,,,,1,,lcText,wdReplaceOne)
EndWith
>Hi Ken,
>
>Are you sure you're range is actually in the text box when you issue your commands? Try:
>
>
>#Define wdReplaceOne 1
>#Define wdTextFrameStory 5  &&word constant
>
>*define range
>NewRange = oDoc.StoryRanges(wdTextFrameStory)
>With NewRange.Find
>  *look for your bookmark in this range
>  *this example is looking for text, I haven't done bookmarks
>  .text = "!lcText!"
>  .MatchCase = .F.
>  .Format = .F.
>  lFound = .Execute(,,,,,,,1,,lcText,wdReplaceOne)
>EndWith
>
>
>Hope that helps.
>Kevin
>
>
>>I am trying to send VFP data to a MS Word DOC by adding bookmarks to the word doc and using the Word objects Goto command to insert the VFP data into the doc. This works great unless the bookmark is in a Textbox. If the bookmark is in a Textbox I get an error 1429 'Word cannot find the requested bookmark'. Does anyone know how I can access the bookmark in the Textbox?? Any and all help is greatly appreciated.
>>
>>Thank You
>>
>>Ken Saldate
Previous
Reply
Map
View

Click here to load this message in the networking platform