Created
September 7, 2021 15:08
-
-
Save nickdyar/89d5529fef9f1924b558fab75fd964ef to your computer and use it in GitHub Desktop.
Reset font and paragraph formatting, and remove numbering/bulleting.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub ClearFormat() | |
' | |
' Microsoft Word Macro | |
' ClearFormat = reset font + paragraph formatting, and remove numbering/bullets | |
' | |
' | |
Selection.Style = ActiveDocument.Styles("Normal") | |
Selection.Range.ListFormat.RemoveNumbers NumberType:=wdNumberParagraph | |
With Selection.Font | |
.Name = "Arial" | |
.Size = 10 | |
.Bold = False | |
.Italic = False | |
.Underline = wdUnderlineNone | |
.UnderlineColor = wdColorAutomatic | |
.StrikeThrough = False | |
.DoubleStrikeThrough = False | |
.Outline = False | |
.Emboss = False | |
.Shadow = False | |
.Hidden = False | |
.SmallCaps = False | |
.AllCaps = False | |
.Color = wdColorAutomatic | |
.Engrave = False | |
.Superscript = False | |
.Subscript = False | |
.Spacing = 0 | |
.Scaling = 100 | |
.Position = 0 | |
.Kerning = 0 | |
.Animation = wdAnimationNone | |
.Ligatures = wdLigaturesNone | |
.NumberSpacing = wdNumberSpacingDefault | |
.NumberForm = wdNumberFormDefault | |
.StylisticSet = wdStylisticSetDefault | |
.ContextualAlternates = 0 | |
End With | |
With Selection.ParagraphFormat | |
.LeftIndent = InchesToPoints(0) | |
.RightIndent = InchesToPoints(0) | |
.SpaceBefore = 0 | |
.SpaceBeforeAuto = False | |
.SpaceAfter = 0 | |
.SpaceAfterAuto = False | |
.LineSpacingRule = wdLineSpaceSingle | |
.Alignment = wdAlignParagraphLeft | |
.WidowControl = True | |
.KeepWithNext = False | |
.KeepTogether = False | |
.PageBreakBefore = False | |
.NoLineNumber = False | |
.Hyphenation = True | |
.FirstLineIndent = InchesToPoints(0) | |
.OutlineLevel = wdOutlineLevelBodyText | |
.CharacterUnitLeftIndent = 0 | |
.CharacterUnitRightIndent = 0 | |
.CharacterUnitFirstLineIndent = 0 | |
.LineUnitBefore = 0 | |
.LineUnitAfter = 0 | |
.MirrorIndents = False | |
.TextboxTightWrap = wdTightNone | |
.CollapsedByDefault = False | |
End With | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment