Macro Error

W

WordWorker

I recorded the following macro using the actual keystrokes to reset a
multilevel list. When I run the compiler, it returns no errors, but when I
try to run the macro or step through it, it returns the error message, "That
propertyis not available on that object." I don't understand or have the
foggiest notion of how to fix it. If I go into the multilevel list
everything is there as it should be. I want the macro to run to reset it
because Word 2007 keeps "forgetting" what the setting are after I've closed
the document then open to use it again.

With ActiveDocument.Styles("Level 1 Bullets").ParagraphFormat
.LeftIndent = InchesToPoints(0.56)
.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.25)
.OutlineLevel = wdOutlineLevelBodyText
.CharacterUnitLeftIndent = 0
.CharacterUnitRightIndent = 0
.CharacterUnitFirstLineIndent = 0
.LineUnitBefore = 0
.LineUnitAfter = 0
.MirrorIndents = False
.TextboxTightWrap = wdTightNone
End With
ActiveDocument.Styles("Level 1 Bullets"). _
NoSpaceBetweenParagraphsOfSameStyle = False
With ListGalleries(wdOutlineNumberGallery).ListTemplates(1).ListLevels(1)
.NumberFormat = ChrW(61548)
.TrailingCharacter = wdTrailingTab
.NumberStyle = wdListNumberStyleBullet
.NumberPosition = InchesToPoints(0.31)
.Alignment = wdListLevelAlignLeft
.TextPosition = InchesToPoints(0.56)
.TabPosition = InchesToPoints(0.56)
.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 = "_Level 1 Bullets"
End With
'
' It continues on with the same type of "With" statements for all 9
"ListLevels"
'
ListGalleries(wdOutlineNumberGallery).ListTemplates(1).Name = ""
Selection.Range.ListFormat.ApplyListTemplateWithLevel ListTemplate:= _
ListGalleries(wdOutlineNumberGallery).ListTemplates(1), _
ContinuePreviousList:=False, ApplyTo:=wdListApplyToSelection, _
DefaultListBehavior:=wdWord10ListBehavior
 
S

Stefan Blom

What exactly are you trying to accomplish? How do you want to "reset" the list?

Note that in order to get predictable numbering in Word 2007 you should set
up a list style.
 
W

WordWorker

I've tried repeatedly to respond, but keep getting "Service Temporarily
Unavailablel". But still interested in a solution.
 
S

Stefan Blom

Well, that message got through. The web interface is not very reliable at
times.

Please explain what you are trying to accomplish.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top