|
-
December 29th, 1999, 01:15 AM
#1
OLE help...
OLE expect plz help.....
How to use the looping for find & replace method in OLE by using WinWord program? And the most important thing is I need all the data are display in table.
Thanks for helping!! 
-
December 29th, 1999, 09:21 AM
#2
Re: OLE help...
Try:
public Sub ReplaceAndCount(sFind as string)
Dim nCount as Long
While ThisDocument.Content.Find.Execute(FindText:=sFind, Forward:=true, replacewith:="@@@@", replace:=wdReplaceOne)
nCount = nCount + 1
Wend
ThisDocument.Content.Find.Execute FindText:="@@@@", Forward:=true, replacewith:=sFind, replace:=wdReplaceAll
Debug.print nCount & " found and replaced"
End Sub
hth,
Duncan
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|