Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Syntax with word template
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00662872
Message ID:
00663408
Views:
22
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform