Hi Mark,
wdFindContinue = 1
wdReplaceAll = 2
cReplaceText = the text you want to insert in place of the cFindtext string
You will find these and all other MS WOrd 2000 constants in the files section.
Liam
>>Hi Mark,
>>
>>Do you mean search and replace a piece of text in a doc with an account number from a DBF? If so, the following works for me.
>>
>>oWord.Selection.Find.Execute(cFindText, .F., .T., .F., .F., .F., .T., wdFindContinue, .F., cReplaceText, wdReplaceAll)
>>
>>Parameters: FindText, MatchCase, MatchWholeWord, MatchWildcards, MatchSoundsLike, MatchAllWordForms, Forward, Wrap, Format, ReplaceWith, Replace
>>
>>HTH
>>
>>Liam
>>
>>
>>>I have a word doc with general account information. An account number is repeated in several places. I'd like to populate those with account number from VFP. I dont like to create multiple bookmarks (can be too many). MailMerge is not an option. What would be the best scenario?
>>>Thansks Mark
>If my text is in a footer will global replace work?
>Thanks Mark
Liam O'Hagan
MCP VFP Desktop Apps