S
snsd
Hi: Thanks to the help of a number of you on this site, the following code
successfully replaces the occurrence of a forward slash that is preceded by
one or more spaces with a highlighted space. I would like to create code that
would remove the occurrence of a forward slash if it is the first character
in the first line of the document. Any ideas?
'Removes / proceeded by a space and replaces with a highlighted space
Dim rDcmForwardSlash As Range
Set rDcmForwardSlash = ActiveDocument.Range
With rDcmForwardSlash.Find
.Text = " @/"
.Replacement.Highlight = True
.Replacement.Text = " "
.MatchWildcards = True
.Execute Replace:=wdReplaceAll
End With
successfully replaces the occurrence of a forward slash that is preceded by
one or more spaces with a highlighted space. I would like to create code that
would remove the occurrence of a forward slash if it is the first character
in the first line of the document. Any ideas?
'Removes / proceeded by a space and replaces with a highlighted space
Dim rDcmForwardSlash As Range
Set rDcmForwardSlash = ActiveDocument.Range
With rDcmForwardSlash.Find
.Text = " @/"
.Replacement.Highlight = True
.Replacement.Text = " "
.MatchWildcards = True
.Execute Replace:=wdReplaceAll
End With