D
DD
I have four documents which make up the sections of a report we issue to a
client. I want to use VBA macros to control the formatting and make the
reports consistent.
I have created a macro which sets the bullet formatting for the selected
bullets (see below) and I have had some help from Jean-Guy Marcil, Helmut
Weber, and Doug Robbins, to come up with a maco that formats all the tables
in the document.
How would I edit my bullet formatting macro so that it is applied to all
bullet lists in the open document?
Sub fmtBulletAlignment()
'
' Clear all tab stops
' Add new tab stops for next/additional column
' Setup Bullet and text locations
Selection.ParagraphFormat.TabStops.ClearAll
Selection.ParagraphFormat.TabStops.Add
Position:=CentimetersToPoints(11.2 _
), Alignment:=wdAlignTabLeft, Leader:=wdTabLeaderSpaces
Selection.ParagraphFormat.TabStops.Add
Position:=CentimetersToPoints(2.2), _
Alignment:=wdAlignTabLeft, Leader:=wdTabLeaderSpaces
With Selection.ParagraphFormat
.LeftIndent = CentimetersToPoints(2.2)
.RightIndent = CentimetersToPoints(0)
.SpaceBefore = 3
.SpaceBeforeAuto = False
.SpaceAfter = 3
.SpaceAfterAuto = False
.LineSpacingRule = wdLineSpaceSingle
.Alignment = wdAlignParagraphLeft
.WidowControl = True
.KeepWithNext = False
.KeepTogether = False
.PageBreakBefore = False
.NoLineNumber = False
.Hyphenation = True
.FirstLineIndent = CentimetersToPoints(-0.75)
.OutlineLevel = wdOutlineLevelBodyText
.CharacterUnitLeftIndent = 0
.CharacterUnitRightIndent = 0
.CharacterUnitFirstLineIndent = 0
.LineUnitBefore = 0
.LineUnitAfter = 0
End With
End Sub
Regards
D Dawson
client. I want to use VBA macros to control the formatting and make the
reports consistent.
I have created a macro which sets the bullet formatting for the selected
bullets (see below) and I have had some help from Jean-Guy Marcil, Helmut
Weber, and Doug Robbins, to come up with a maco that formats all the tables
in the document.
How would I edit my bullet formatting macro so that it is applied to all
bullet lists in the open document?
Sub fmtBulletAlignment()
'
' Clear all tab stops
' Add new tab stops for next/additional column
' Setup Bullet and text locations
Selection.ParagraphFormat.TabStops.ClearAll
Selection.ParagraphFormat.TabStops.Add
Position:=CentimetersToPoints(11.2 _
), Alignment:=wdAlignTabLeft, Leader:=wdTabLeaderSpaces
Selection.ParagraphFormat.TabStops.Add
Position:=CentimetersToPoints(2.2), _
Alignment:=wdAlignTabLeft, Leader:=wdTabLeaderSpaces
With Selection.ParagraphFormat
.LeftIndent = CentimetersToPoints(2.2)
.RightIndent = CentimetersToPoints(0)
.SpaceBefore = 3
.SpaceBeforeAuto = False
.SpaceAfter = 3
.SpaceAfterAuto = False
.LineSpacingRule = wdLineSpaceSingle
.Alignment = wdAlignParagraphLeft
.WidowControl = True
.KeepWithNext = False
.KeepTogether = False
.PageBreakBefore = False
.NoLineNumber = False
.Hyphenation = True
.FirstLineIndent = CentimetersToPoints(-0.75)
.OutlineLevel = wdOutlineLevelBodyText
.CharacterUnitLeftIndent = 0
.CharacterUnitRightIndent = 0
.CharacterUnitFirstLineIndent = 0
.LineUnitBefore = 0
.LineUnitAfter = 0
End With
End Sub
Regards
D Dawson