Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
OLE Automation & MS Word
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00803546
Message ID:
00803554
Vues:
11
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform