Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Macro Error
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).ListTemplate s(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).ListTemplate s(1).Name = "" Selection.Range.ListFormat.ApplyListTemplateWithLe vel ListTemplate:= _ ListGalleries(wdOutlineNumberGallery).ListTemplate s(1), _ ContinuePreviousList:=False, ApplyTo:=wdListApplyToSelection, _ DefaultListBehavior:=wdWord10ListBehavior |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Macro Error
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. -- Stefan Blom Microsoft Word MVP "WordWorker" wrote: 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).ListTemplate s(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).ListTemplate s(1).Name = "" Selection.Range.ListFormat.ApplyListTemplateWithLe vel ListTemplate:= _ ListGalleries(wdOutlineNumberGallery).ListTemplate s(1), _ ContinuePreviousList:=False, ApplyTo:=wdListApplyToSelection, _ DefaultListBehavior:=wdWord10ListBehavior |
#3
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Macro Error
I've tried repeatedly to respond, but keep getting "Service Temporarily
Unavailablel". But still interested in a solution. "Stefan Blom" wrote: 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. -- Stefan Blom Microsoft Word MVP "WordWorker" wrote: 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).ListTemplate s(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).ListTemplate s(1).Name = "" Selection.Range.ListFormat.ApplyListTemplateWithLe vel ListTemplate:= _ ListGalleries(wdOutlineNumberGallery).ListTemplate s(1), _ ContinuePreviousList:=False, ApplyTo:=wdListApplyToSelection, _ DefaultListBehavior:=wdWord10ListBehavior |
#4
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Macro Error
Well, that message got through. The web interface is not very reliable at
times. Please explain what you are trying to accomplish. -- Stefan Blom Microsoft Word MVP "WordWorker" wrote in message ... I've tried repeatedly to respond, but keep getting "Service Temporarily Unavailablel". But still interested in a solution. "Stefan Blom" wrote: 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. -- Stefan Blom Microsoft Word MVP "WordWorker" wrote: 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).ListTemplate s(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).ListTemplate s(1).Name = "" Selection.Range.ListFormat.ApplyListTemplateWithLe vel ListTemplate:= _ ListGalleries(wdOutlineNumberGallery).ListTemplate s(1), _ ContinuePreviousList:=False, ApplyTo:=wdListApplyToSelection, _ DefaultListBehavior:=wdWord10ListBehavior |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Template macro error | Microsoft Word Help | |||
Macro Error | Microsoft Word Help | |||
macro - compile error | Microsoft Word Help | |||
macro runtime error | Microsoft Word Help | |||
Macro Run-time Error '5941' | New Users |