Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
OLE Automation & MS Word
Message
 
 
À
24/06/2003 17:57:50
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00803546
Message ID:
00803553
Vues:
8
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(wdPrimaryHeaderStory)
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform