A family of Microsoft word processing software products for creating web, email, and print documents.
Thanks Jay!! That put me on the right path.
I had to change the optional execute find/replace lines to a single one and then I added coding that changes the list paragraph style to actual bullets with a .5 indent.
Other modifications include removing the *s and changing the document font to our standard and paragraph spacing to single. Not sure why Word defaults to the 1.08 spacing...but that is a wish list item for a future build. :)
See below for the revised coding - may be helpful for someone else too. :)
Sub eRSScTESSFormat()
'This macro turns * to bulleted paragraphs
With ActiveDocument.Styles("List Paragraph").ParagraphFormat
.LeftIndent = InchesToPoints(0.5)
.RightIndent = InchesToPoints(0)
.SpaceBefore = 0
.SpaceBeforeAuto = False
.SpaceAfter = 8
.SpaceAfterAuto = False
.LineSpacingRule = wdLineSpaceMultiple
.LineSpacing = LinesToPoints(1.08)
.Alignment = wdAlignParagraphLeft
.WidowControl = True
.KeepWithNext = False
.KeepTogether = False
.PageBreakBefore = False
.NoLineNumber = False
.Hyphenation = True
.FirstLineIndent = InchesToPoints(-0.25)
.OutlineLevel = wdOutlineLevelBodyText
.CharacterUnitLeftIndent = 0
.CharacterUnitRightIndent = 0
.CharacterUnitFirstLineIndent = 0
.LineUnitBefore = 0
.LineUnitAfter = 0
.MirrorIndents = False
.TextboxTightWrap = wdTightNone
.CollapsedByDefault = False
End With
ActiveDocument.Styles("List Paragraph"). _
NoSpaceBetweenParagraphsOfSameStyle = True
With ListGalleries(wdBulletGallery).ListTemplates(1).ListLevels(1)
.NumberFormat = ChrW(61623)
.TrailingCharacter = wdTrailingTab
.NumberStyle = wdListNumberStyleBullet
.NumberPosition = InchesToPoints(0.25)
.Alignment = wdListLevelAlignLeft
.TextPosition = InchesToPoints(0.5)
.TabPosition = wdUndefined
.ResetOnHigher = 0
.StartAt = 1
With .Font
.Bold = wdUndefined
.Italic = wdUndefined
.StrikeThrough = wdUndefined
.Subscript = wdUndefined
.Superscript = wdUndefined
.Shadow = wdUndefined
.Outline = wdUndefined
.Emboss = wdUndefined
.Engrave = wdUndefined
.AllCaps = wdUndefined
.Hidden = wdUndefined
.Underline = wdUndefined
.Color = wdUndefined
.Size = wdUndefined
.Animation = wdUndefined
.DoubleStrikeThrough = wdUndefined
.Name = "Symbol"
End With
.LinkedStyle = "List Paragraph"
End With
ActiveDocument.Styles("List Paragraph").LinkToListTemplate ListTemplate:= _
ListGalleries(wdBulletGallery).ListTemplates(1), ListLevelNumber:=1
With ActiveDocument.Styles("List Paragraph")
.AutomaticallyUpdate = False
.BaseStyle = "Normal"
.NextParagraphStyle = "List Paragraph"
End With
Dim rg As Range
ActiveDocument.Range.Find.Execute FindText:="*", Replacewith:="^p*", Replace:=wdReplaceAll
' turn off all AutoFormat options except bullets
With Options
.AutoFormatApplyBulletedLists = True
.AutoFormatApplyFirstIndents = True
.AutoFormatApplyHeadings = False
.AutoFormatApplyLists = False
.AutoFormatApplyOtherParas = False
End With
Set rg = ActiveDocument.Range
With rg.Find
.Text = "*"
While .Execute
If rg.Start = rg.Paragraphs(1).Range.Start Then
' star is first character in current paragraph
rg.Style = ActiveDocument.Styles("List Paragraph")
rg.Paragraphs(1).Range.AutoFormat
End If
' prepare to search for next star
rg.Collapse wdCollapseEnd
Wend
End With
' restore default settings
With Options
.AutoFormatApplyFirstIndents = True
.AutoFormatApplyHeadings = True
.AutoFormatApplyLists = True
.AutoFormatApplyOtherParas = True
End With
Selection.WholeStory
Selection.Font.Name = "Arial"
Selection.Font.Size = 11
With Selection.ParagraphFormat
.SpaceBefore = 0
.SpaceBeforeAuto = False
.SpaceAfter = 0
.SpaceAfterAuto = False
.LineSpacingRule = wdLineSpaceSingle
.LineUnitBefore = 0
.LineUnitAfter = 0
End With
ActiveDocument.Range.Find.Execute FindText:="*", Replacewith:="", Replace:=wdReplaceAll
End Sub
Thanks again,
Lisa