Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.tables
Sharon Sharon is offline
external usenet poster
 
Posts: 111
Default table/numbering/format problem

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

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
RTF Format and Numbering Andy T Microsoft Word Help 0 February 7th 07 12:15 PM
I'm having the same numbering problem, i.e., MarvInBoise Microsoft Word Help 5 December 27th 06 09:23 AM
Table of contents numbering not consistent with page numbering format srd Tables 1 July 9th 06 07:49 PM
numbering problem Dave Mailmerge 1 May 25th 06 08:53 PM
Format problem with merge fields in word table Jan Mailmerge 1 May 20th 05 11:15 AM


All times are GMT +1. The time now is 04:57 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"