Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Syntax with word template
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00662872
Message ID:
00663408
Vues:
21
The reason you're missing the text boxes is that
NewRange = oWord.ActiveDocument.Content
refers to all the text in the main "story." It doesn't include text in other "stories," such as headers, footers, and shapes (meaning text boxes).

To search the text in text boxes, access the TextFrame story:
#DEFINE wdTextFrameStory 5
NewRange = oDoc.StoryRanges(wdTextFrameStory)
Then your code, shown below, should work fine.
>With NewRange.Find
>  .ClearFormatting
>  .Forward = .T.
>  .Text = "!lcActNbr!"
>  .Execute
>  If .Found
>    NewRange.Text = ALLTR(ltrctr.act_nbr)
>  EndIf
>EndWith
- della
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform