Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search/Replace in MS Word from VB program

Status
Not open for further replies.

kalyan

Programmer
Jun 25, 1999
10
CH
The VB program is required to open a word document and search and replace a particular string in the document. The search/replace operation is also applicable to headers and footers. To implement this Wordbasic commands are being used in the VB. But,the program is unable to do search/replace operations on the text present in the header/footer.<br>
<br>
Any workarounds to this problem will be highly appreciated.
 
if you're using WordBasic (word 6/95) then you must change the current view from normal (the default) to header/footer:<br>
<br>
objWord.viewHeader<br>
call SearchReplace<br>
<br>
'gotoheaderfooter toggles the view between the two<br>
objWord.gotoheaderfooter<br>
call SearchReplace<br>
<br>
objWord.viewnormal<br>
call SearchReplace<br>
<br>
<br>

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top