Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.word.tables
|
|||
|
|||
![]()
I have created a macro (with code shown below) that prompts me for a prefix
letter A, B, C (or whatever you want to put) and then a prompt that asks which number to begin the numbering with. I usually use this macro in a table format. It has always worked out great until now. For some reason when I run the macro, there is a line after the value, i.e., C1____, C2______ It has always confused me that when you do the automatic numbering it also always puts a tab after the number even if I put all the settings to 0. Can someone tell me what I am doing wrong? Thanks. Sub IDSNumbering() ' ' IDSNumbergin Macro ' Macro recorded November 28, 2006 by Sharon Hart ' With ListGalleries(wdNumberGallery).ListTemplates(1).Li stLevels(1) .NumberFormat = "%1" .TrailingCharacter = False .NumberStyle = wdListNumberStyleArabic .NumberPosition = InchesToPoints(0) .Alignment = wdListLevelAlignLeft .TextPosition = InchesToPoints(0) .TabPosition = InchesToPoints(0) .ResetOnHigher = 0 .StartAt = 1 With .Font .Bold = False .Italic = False .StrikeThrough = False .Subscript = False .Superscript = False .Shadow = False .Outline = False .Emboss = False .Engrave = False .AllCaps = False .Hidden = False .Underline = wdUnderlineNone .Color = wdColorBlack .Size = 10 .Animation = wdUndefined .DoubleStrikeThrough = False .Name = "Times New Roman" End With .LinkedStyle = "" End With ListGalleries(wdNumberGallery).ListTemplates(1).Na me = "" Selection.Range.ListFormat.ApplyListTemplate ListTemplate:=ListGalleries( _ wdNumberGallery).ListTemplates(1), ContinuePreviousList:=True, ApplyTo:= _ wdListApplyToWholeList, DefaultListBehavior:=wdWord10ListBehavior Dim Message2, Title2, Default2, MyPrefix Message2 = "Enter a Prefix" ' Set prompt. Title2 = "Prefix" ' Set title. Default2 = "A" ' Set default. ' Display message, title, and default value. MyPrefix = InputBox(Message2, Title2, Default2) Dim Message, Title, Default, MyValue Message = "Enter a value" ' Set prompt. Title = "Reference Number" ' Set title. Default = "1" ' Set default. ' Display message, title, and default value. MyValue = InputBox(Message, Title, Default) With ListGalleries(wdNumberGallery).ListTemplates(6).Li stLevels(1) .NumberFormat = MyPrefix & "%1" .TrailingCharacter = wdTrailingTab .NumberStyle = wdListNumberStyleArabic .NumberPosition = InchesToPoints(0.5) .Alignment = wdListLevelAlignLeft .TextPosition = InchesToPoints(0.5) .TabPosition = InchesToPoints(0.5) .ResetOnHigher = 0 .StartAt = MyValue 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 = "" End With .LinkedStyle = "" End With ListGalleries(wdNumberGallery).ListTemplates(6).Na me = "" Selection.Range.ListFormat.ApplyListTemplate ListTemplate:=ListGalleries( _ wdNumberGallery).ListTemplates(6), ContinuePreviousList:=False, ApplyTo:= _ wdListApplyToWholeList, DefaultListBehavior:=wdWord10ListBehavior End Sub -- S |
Reply |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
RTF Format and Numbering | Microsoft Word Help | |||
I'm having the same numbering problem, i.e., | Microsoft Word Help | |||
Table of contents numbering not consistent with page numbering format | Tables | |||
numbering problem | Mailmerge | |||
Format problem with merge fields in word table | Mailmerge |