Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Word
application.errors
conversions
docmanagement
drawing.graphics
formatting.longdocs
international
internet.assistant
mail
mailmerge.fields
menustoolbars
newusers
numbering
oleinterop
pagelayout
printingfonts
setup.networking
spelling.grammar
tables
vba.addins
vba.beginners
vba.customization
vba.general
vba.userforms
web.authoring
word6-7macros
word97vba
  
 
date: 10 Oct 2008 00:16:29 GMT,    group: microsoft.public.word.numbering        back       


converting autonumbers into hard-coded static numbers   
In MS Word, we currently number heading levels: Section 1, 1.1, 1.1.1,
Section 2, 2.1, etc..
These numbers auto-increment throughout the document and are used to
generate the TOC and cross-references.

We need a tool to freeze this Section numbering system (after we
finalize the file and generate the TOC, etc) and "hard-code" the
numbers as regular text (keep the numbers but remove the
auto-generation feature).
(We can currently do something similar by converting the Word file to
PDF or HTML and then converting it back to Word.)

Similarly, we'll also need to "hard-code" the following automatic
numbering:
Table & Figure Captions (which pick up the number from the heading
level and then auto-increment in each section). For instance, the
tables in Section 2 would be numbered Table 2-1, 2-2, etc.
Page numbers also auto-increment and would need to be hard-coded.

Can someone suggest how we can accomplish this? Should I be posting to
another ng?

Thank.


Kevin
--
date: 10 Oct 2008 00:16:29 GMT   author:   Kevin

Re: converting autonumbers into hard-coded static numbers   
Open the VB Editor (ALT+F11)

Enter the following line in the immediate window (View>Immediate Window):

ActiveDocument.ConvertNumbersToText

Press enter.

Also see:  http://gregmaxey.mvps.org/Field_Macros.htm and the part on 
unlinking fields.



Kevin wrote:
> In MS Word, we currently number heading levels: Section 1, 1.1, 1.1.1,
> Section 2, 2.1, etc..
> These numbers auto-increment throughout the document and are used to
> generate the TOC and cross-references.
>
> We need a tool to freeze this Section numbering system (after we
> finalize the file and generate the TOC, etc) and "hard-code" the
> numbers as regular text (keep the numbers but remove the
> auto-generation feature).
> (We can currently do something similar by converting the Word file to
> PDF or HTML and then converting it back to Word.)
>
> Similarly, we'll also need to "hard-code" the following automatic
> numbering:
> Table & Figure Captions (which pick up the number from the heading
> level and then auto-increment in each section). For instance, the
> tables in Section 2 would be numbered Table 2-1, 2-2, etc.
> Page numbers also auto-increment and would need to be hard-coded.
>
> Can someone suggest how we can accomplish this? Should I be posting to
> another ng?
>
> Thank.
>
>
> Kevin

-- 
Greg Maxey -  Word MVP

My web site http://gregmaxey.mvps.org
Word MVP web site http://word.mvps.org

McCain/Palin '08 !!!
date: Thu, 9 Oct 2008 20:31:07 -0400   author:   Greg Maxey RrOMEOgOLF

Re: converting autonumbers into hard-coded static numbers   
Greg Maxey wrote:

> 
> Open the VB Editor (ALT+F11)
> 
> Enter the following line in the immediate window (View>Immediate
> Window):
> 
> ActiveDocument.ConvertNumbersToText
> 
> Press enter.
> 
> Also see:  http://gregmaxey.mvps.org/Field_Macros.htm and the part on
> unlinking fields.
> 
> 
> 
> Kevin wrote:
> > In MS Word, we currently number heading levels: Section 1, 1.1,
> > 1.1.1, Section 2, 2.1, etc..
> > These numbers auto-increment throughout the document and are used to
> > generate the TOC and cross-references.
> > 
> > We need a tool to freeze this Section numbering system (after we
> > finalize the file and generate the TOC, etc) and "hard-code" the
> > numbers as regular text (keep the numbers but remove the
> > auto-generation feature).
> > (We can currently do something similar by converting the Word file
> > to PDF or HTML and then converting it back to Word.)
> > 
> > Similarly, we'll also need to "hard-code" the following automatic
> > numbering:
> > Table & Figure Captions (which pick up the number from the heading
> > level and then auto-increment in each section). For instance, the
> > tables in Section 2 would be numbered Table 2-1, 2-2, etc.
> > Page numbers also auto-increment and would need to be hard-coded.
> > 
> > Can someone suggest how we can accomplish this? Should I be posting
> > to another ng?
> > 
> > Thank.
> > 
> > 
> > Kevin

This works fine with heading numbers, but doesn't seem to for numbering
in caption numbers. Is there a way to do that too?

Thanx.

Kevin

--
date: 13 Oct 2008 23:29:27 GMT   author:   Kevin

Re: converting autonumbers into hard-coded static numbers   
Captions consist of a label plus a { SEQ } field.  To use vba code to 
convert them to text, you would use:

Dim afield As Field
For Each afield In ActiveDocument.Fields
    With afield
        If .Type = wdFieldSequence Then
            .Unlink
        End If
    End With
Next afield


-- 
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

<Kevin> wrote in message news:48f3d9d7$0$33578$742ec2ed@news.sonic.net...
> Greg Maxey wrote:
>
>>
>> Open the VB Editor (ALT+F11)
>>
>> Enter the following line in the immediate window (View>Immediate
>> Window):
>>
>> ActiveDocument.ConvertNumbersToText
>>
>> Press enter.
>>
>> Also see:  http://gregmaxey.mvps.org/Field_Macros.htm and the part on
>> unlinking fields.
>>
>>
>>
>> Kevin wrote:
>> > In MS Word, we currently number heading levels: Section 1, 1.1,
>> > 1.1.1, Section 2, 2.1, etc..
>> > These numbers auto-increment throughout the document and are used to
>> > generate the TOC and cross-references.
>> >
>> > We need a tool to freeze this Section numbering system (after we
>> > finalize the file and generate the TOC, etc) and "hard-code" the
>> > numbers as regular text (keep the numbers but remove the
>> > auto-generation feature).
>> > (We can currently do something similar by converting the Word file
>> > to PDF or HTML and then converting it back to Word.)
>> >
>> > Similarly, we'll also need to "hard-code" the following automatic
>> > numbering:
>> > Table & Figure Captions (which pick up the number from the heading
>> > level and then auto-increment in each section). For instance, the
>> > tables in Section 2 would be numbered Table 2-1, 2-2, etc.
>> > Page numbers also auto-increment and would need to be hard-coded.
>> >
>> > Can someone suggest how we can accomplish this? Should I be posting
>> > to another ng?
>> >
>> > Thank.
>> >
>> >
>> > Kevin
>
> This works fine with heading numbers, but doesn't seem to for numbering
> in caption numbers. Is there a way to do that too?
>
> Thanx.
>
> Kevin
>
> -- 
>
date: Tue, 14 Oct 2008 11:07:49 +1000   author:   Doug Robbins - Word MVP

Re: converting autonumbers into hard-coded static numbers   
Doug,

I don't know if the OP read and followed all my suggestions or not.  That 
was there.



Doug Robbins - Word MVP wrote:
> Captions consist of a label plus a { SEQ } field.  To use vba code to
> convert them to text, you would use:
>
> Dim afield As Field
> For Each afield In ActiveDocument.Fields
>    With afield
>        If .Type = wdFieldSequence Then
>            .Unlink
>        End If
>    End With
> Next afield
>
>
>
> <Kevin> wrote in message
> news:48f3d9d7$0$33578$742ec2ed@news.sonic.net...
>> Greg Maxey wrote:
>>
>>>
>>> Open the VB Editor (ALT+F11)
>>>
>>> Enter the following line in the immediate window (View>Immediate
>>> Window):
>>>
>>> ActiveDocument.ConvertNumbersToText
>>>
>>> Press enter.
>>>
>>> Also see:  http://gregmaxey.mvps.org/Field_Macros.htm and the part
>>> on unlinking fields.
>>>
>>>
>>>
>>> Kevin wrote:
>>>> In MS Word, we currently number heading levels: Section 1, 1.1,
>>>> 1.1.1, Section 2, 2.1, etc..
>>>> These numbers auto-increment throughout the document and are used
>>>> to generate the TOC and cross-references.
>>>>
>>>> We need a tool to freeze this Section numbering system (after we
>>>> finalize the file and generate the TOC, etc) and "hard-code" the
>>>> numbers as regular text (keep the numbers but remove the
>>>> auto-generation feature).
>>>> (We can currently do something similar by converting the Word file
>>>> to PDF or HTML and then converting it back to Word.)
>>>>
>>>> Similarly, we'll also need to "hard-code" the following automatic
>>>> numbering:
>>>> Table & Figure Captions (which pick up the number from the heading
>>>> level and then auto-increment in each section). For instance, the
>>>> tables in Section 2 would be numbered Table 2-1, 2-2, etc.
>>>> Page numbers also auto-increment and would need to be hard-coded.
>>>>
>>>> Can someone suggest how we can accomplish this? Should I be posting
>>>> to another ng?
>>>>
>>>> Thank.
>>>>
>>>>
>>>> Kevin
>>
>> This works fine with heading numbers, but doesn't seem to for
>> numbering in caption numbers. Is there a way to do that too?
>>
>> Thanx.
>>
>> Kevin
>>
>> --

-- 
Greg Maxey -  Word MVP

My web site http://gregmaxey.mvps.org
Word MVP web site http://word.mvps.org

McCain/Palin '08 !!!
date: Mon, 13 Oct 2008 21:35:49 -0400   author:   Greg Maxey RrOMEOgOLF

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us