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:
00663741
Vues:
11
Della,

Thanks for the reponse. This makes a lot of sense and I had kinda come to a conclusion along these lines, just didn't quite know how to go about it. However, I must still be missing something. While it no longer blows up, it isn't finding the text variables on the document. Any ideas?

Thanks,
Kevin


>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
Répondre
Fil
Voir

Click here to load this message in the networking platform