V
vvskpk
Hi there,
My management panel asked to create automated styles for bullets and
numbered bullets which by pressing Shift+Alt+arrow will gets indented to next
level bullet (say second level bullet or second level number) or same action
by pressing tab key.
Now instead of styles, they need a macro toolbar for these two bullet types,
i.e., bullet styles and numbering styles (two buttons). Clicking the button
should get first level and by pressing tab key it should get indented to
second level bullet or number.
I tried recording macro and customized it. But I don't know where and how to
add "Selection.Range.ListFormat.ListIndent". So I'm sending the recorded
program here.
In short, I need a TOOLBAR WITH SINGLE BUTTON WITH KEYBOARD INDENTED ACTIONS
Please also tell me the procedure of deploying the macro toolbar enabled
file to another system.
Please help me and many many thanks in advance.
'---------------------------first bullet------------------------------------
With ListGalleries(wdBulletGallery).ListTemplates(3).ListLevels(1)
..NumberFormat = ChrW(61607)
..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 = "Wingdings"
End With
..LinkedStyle = ""
End With
ListGalleries(wdBulletGallery).ListTemplates(3).Name = ""
Selection.Range.ListFormat.ApplyListTemplateWithLevel ListTemplate:= _
ListGalleries(wdBulletGallery).ListTemplates(3),
ContinuePreviousList:= _
False, ApplyTo:=wdListApplyToWholeList, DefaultListBehavior:= _
wdWord10ListBehavior
With Selection.ParagraphFormat
..LeftIndent = InchesToPoints(0.25)
..SpaceBeforeAuto = False
..SpaceAfterAuto = False
End With
Selection.ParagraphFormat.TabStops.Add Position:=InchesToPoints(0.25), _
Alignment:=wdAlignTabLeft, Leader:=wdTabLeaderSpaces
' -------------------------------second
level----------------------------------
With ListGalleries(wdBulletGallery).ListTemplates(2).ListLevels(1)
..NumberFormat = "o"
..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 = "Courier New"
End With
..LinkedStyle = ""
End With
ListGalleries(wdBulletGallery).ListTemplates(2).Name = ""
Selection.Range.ListFormat.ApplyListTemplateWithLevel ListTemplate:= _
ListGalleries(wdBulletGallery).ListTemplates(2),
ContinuePreviousList:= _
False, ApplyTo:=wdListApplyToWholeList, DefaultListBehavior:= _
wdWord10ListBehavior
Selection.ParagraphFormat.TabStops.Add Position:=InchesToPoints(0.5), _
Alignment:=wdAlignTabLeft, Leader:=wdTabLeaderSpaces
'------------------------------------ third
bullet---------------------------------------
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 = ""
End With
ListGalleries(wdBulletGallery).ListTemplates(1).Name = ""
Selection.Range.ListFormat.ApplyListTemplateWithLevel ListTemplate:= _
ListGalleries(wdBulletGallery).ListTemplates(1),
ContinuePreviousList:= _
False, ApplyTo:=wdListApplyToWholeList, DefaultListBehavior:= _
wdWord10ListBehavior
Selection.Range.ListFormat.ListIndent
Selection.ParagraphFormat.TabStops(InchesToPoints(0.5)).Position = _
InchesToPoints(0.75)
End Sub
My management panel asked to create automated styles for bullets and
numbered bullets which by pressing Shift+Alt+arrow will gets indented to next
level bullet (say second level bullet or second level number) or same action
by pressing tab key.
Now instead of styles, they need a macro toolbar for these two bullet types,
i.e., bullet styles and numbering styles (two buttons). Clicking the button
should get first level and by pressing tab key it should get indented to
second level bullet or number.
I tried recording macro and customized it. But I don't know where and how to
add "Selection.Range.ListFormat.ListIndent". So I'm sending the recorded
program here.
In short, I need a TOOLBAR WITH SINGLE BUTTON WITH KEYBOARD INDENTED ACTIONS
Please also tell me the procedure of deploying the macro toolbar enabled
file to another system.
Please help me and many many thanks in advance.
'---------------------------first bullet------------------------------------
With ListGalleries(wdBulletGallery).ListTemplates(3).ListLevels(1)
..NumberFormat = ChrW(61607)
..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 = "Wingdings"
End With
..LinkedStyle = ""
End With
ListGalleries(wdBulletGallery).ListTemplates(3).Name = ""
Selection.Range.ListFormat.ApplyListTemplateWithLevel ListTemplate:= _
ListGalleries(wdBulletGallery).ListTemplates(3),
ContinuePreviousList:= _
False, ApplyTo:=wdListApplyToWholeList, DefaultListBehavior:= _
wdWord10ListBehavior
With Selection.ParagraphFormat
..LeftIndent = InchesToPoints(0.25)
..SpaceBeforeAuto = False
..SpaceAfterAuto = False
End With
Selection.ParagraphFormat.TabStops.Add Position:=InchesToPoints(0.25), _
Alignment:=wdAlignTabLeft, Leader:=wdTabLeaderSpaces
' -------------------------------second
level----------------------------------
With ListGalleries(wdBulletGallery).ListTemplates(2).ListLevels(1)
..NumberFormat = "o"
..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 = "Courier New"
End With
..LinkedStyle = ""
End With
ListGalleries(wdBulletGallery).ListTemplates(2).Name = ""
Selection.Range.ListFormat.ApplyListTemplateWithLevel ListTemplate:= _
ListGalleries(wdBulletGallery).ListTemplates(2),
ContinuePreviousList:= _
False, ApplyTo:=wdListApplyToWholeList, DefaultListBehavior:= _
wdWord10ListBehavior
Selection.ParagraphFormat.TabStops.Add Position:=InchesToPoints(0.5), _
Alignment:=wdAlignTabLeft, Leader:=wdTabLeaderSpaces
'------------------------------------ third
bullet---------------------------------------
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 = ""
End With
ListGalleries(wdBulletGallery).ListTemplates(1).Name = ""
Selection.Range.ListFormat.ApplyListTemplateWithLevel ListTemplate:= _
ListGalleries(wdBulletGallery).ListTemplates(1),
ContinuePreviousList:= _
False, ApplyTo:=wdListApplyToWholeList, DefaultListBehavior:= _
wdWord10ListBehavior
Selection.Range.ListFormat.ListIndent
Selection.ParagraphFormat.TabStops(InchesToPoints(0.5)).Position = _
InchesToPoints(0.75)
End Sub