K
Kou Vang
Can you only find and replace once using .Find? If I have multiple words to
find and replace, is there a better way? Here is my code:
Option Explicit
Set myrange = appWord.ActiveDocument.Content
With myrange.Find
.Text = "SiteIn"
.Execute replacewith:=SiteInfo & "." & SiteScheme
.Text = "SiteBad"
.Execute replacewith:=SiteInfo & "_" & SiteScheme & "bad"
.Text = "SiteDiscard"
.Execute replacewith:=SiteInfo & "_" & SiteScheme & "dis"
.Text = "SiteNum"
.Execute replacewith:=SiteInfo
End With
find and replace, is there a better way? Here is my code:
Option Explicit
Set myrange = appWord.ActiveDocument.Content
With myrange.Find
.Text = "SiteIn"
.Execute replacewith:=SiteInfo & "." & SiteScheme
.Text = "SiteBad"
.Execute replacewith:=SiteInfo & "_" & SiteScheme & "bad"
.Text = "SiteDiscard"
.Execute replacewith:=SiteInfo & "_" & SiteScheme & "dis"
.Text = "SiteNum"
.Execute replacewith:=SiteInfo
End With