Hey everyone,
I was wondering if someone could take a look at this for me please ?
The following macro is supposed to :
Remove all double spaces between words.
Remove all double spaces between paragraphs.
Change all body text to garamond font.
Remove all paragraph indents.
Everything seems to work ok except for the last part, can't get it to remove indents.
Sub cleanup()
'
' cleanup Macro
'
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = " "
.Replacement.Text = " "
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.Text = "^p^p"
.Replacement.Text = "^p"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.ClearFormatting
Selection.Find.Style = ActiveDocument.Styles("Normal")
With Selection.Find.ParagraphFormat
End With
Selection.Find.Replacement.ClearFormatting
With Selection.Find.Replacement.Font
.Name = "Garamond"
.Size = 12
.Bold = False
.Italic = False
End With
With Selection.Find
.Text = ""
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "^p^t"
.Replacement.Text = "^p"
.Forward = True
.Wrap = wdFindContinue
.Format = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Also, I've assigned a QAT button to the macro but it seems to disappear when I email the file to someone else.
Is there another step or an addition to the code that would make the button stick ?
Thanks.
I was wondering if someone could take a look at this for me please ?
The following macro is supposed to :
Remove all double spaces between words.
Remove all double spaces between paragraphs.
Change all body text to garamond font.
Remove all paragraph indents.
Everything seems to work ok except for the last part, can't get it to remove indents.
Sub cleanup()
'
' cleanup Macro
'
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = " "
.Replacement.Text = " "
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.Text = "^p^p"
.Replacement.Text = "^p"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.ClearFormatting
Selection.Find.Style = ActiveDocument.Styles("Normal")
With Selection.Find.ParagraphFormat
End With
Selection.Find.Replacement.ClearFormatting
With Selection.Find.Replacement.Font
.Name = "Garamond"
.Size = 12
.Bold = False
.Italic = False
End With
With Selection.Find
.Text = ""
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "^p^t"
.Replacement.Text = "^p"
.Forward = True
.Wrap = wdFindContinue
.Format = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Also, I've assigned a QAT button to the macro but it seems to disappear when I email the file to someone else.
Is there another step or an addition to the code that would make the button stick ?
Thanks.