Thread: [Solved] Help required with spacing
View Single Post
 
Old 08-10-2011, 05:46 AM
rohanmalhotra rohanmalhotra is offline Windows XP Office 2003
Novice
 
Join Date: Aug 2011
Posts: 3
rohanmalhotra is on a distinguished road
Unhappy Help required with spacing

Hi

I have created a macro that automatically gives 2 spaces after a period. Unfortunately, it also gives 2 spaces in a URL. Not sure how to rectify this. I have attached the code below :

HTML Code:
Sub TwoSpaces()
    Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    With Selection.Find
        .Text = "([.])"
        .Replacement.Text = "\1  "
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchWildcards = True
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Any help will be appreciated.

Thanks in advance.
Reply With Quote