converting autonumbers into hard-coded static numbers

K

Kevin

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
--
 
G

Greg Maxey

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.


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


McCain/Palin '08 !!!
 
K

Kevin

Greg said:
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.

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

--
 
D

Doug Robbins - Word MVP

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
 
G

Greg Maxey

Doug,

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


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

--
Greg Maxey - Word MVP

My web site http://gregmaxey.mvps.org


McCain/Palin '08 !!!
 

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