How do I setup 3 digit page numbers in the TOC

K

Kevin

I have been able to use the SEQ field to have my document
numbered in the footer for Part, Section and Page. For
example (1-2-3) is Part 1, Section 2, Page 3. The field
code is: {SEQ Part \c}-{SEQ Sect \c}-{Page}.

For the life of me I cannot get the Table of Contents to
have this format. Currently I can get Section and Page but
not Part. i.e. 2-3. The TOC field code is: {TOC \F ENG \S
Sect \* MERGEFORMAT}.

Two \s switches do not work in the TOC field.

Any help or ideas would be greatly appreciated.

Kevin
 
J

Jezebel

Your supervisor should put you out of your misery before you do any further
damage. What you're aiming for is technically clever, but it falls under the
proscriptions of the Cruelty to Readers Act.

Finding the right page should take one step, not three.
 
C

Charles Kenyon

I don't know that anyone will have a solution and I doubt anyone will have
sympathy unless this is a requirement being foisted on you. If it is, tell
the person responsible that incremental updating of written material has
been responsible for at least one major industrial accident leading to
death. MVP John McGhie posted links for details some time ago. People who
have real work to do will put such updating at the bottom of their stack of
things to do and leave it there.
 
K

Kevin

Thanks for the opinion but I am producing very large and
detailed technical manuals for a government agency and
this is the universal page number format for these types
of documents.

Are you saying it is impossible to do this with MS Word?
If so, I'll have to switch to something that can do it.

I would prefer to stick with MS Word so any help would be
welcome.

Thanks, Kevin
 
J

Jezebel

The fact these manuals are large and technical, and that 'this is how it's
always been done' is no reason to perpetrate the idiocy. Be brave and create
a good document. As a responsible technical writer, you have no excuse for
just shrugging and adding to the world's collection of unreadable manuals.
In a lot of years of creating manuals I have *never* had someone complain,
when presented with a good document, that they want to go back to the old
format.
 
P

Peter Hewett

Hi Kevin

If you can't change what you have as Jez' suggests can you answer a few questions.

- Does the TOC actually contain everything you want (apart from the numbering!)?
- Can you illustrate using 5 or 6 lines exactly what you want the TOC to look like?
- What is the format of a TOC entry, can you show field codes as well?

I have some ideas but until I have the above information I do now know whether they will
work.

Cheers - Peter


I have been able to use the SEQ field to have my document
numbered in the footer for Part, Section and Page. For
example (1-2-3) is Part 1, Section 2, Page 3. The field
code is: {SEQ Part \c}-{SEQ Sect \c}-{Page}.

For the life of me I cannot get the Table of Contents to
have this format. Currently I can get Section and Page but
not Part. i.e. 2-3. The TOC field code is: {TOC \F ENG \S
Sect \* MERGEFORMAT}.

Two \s switches do not work in the TOC field.

Any help or ideas would be greatly appreciated.

Kevin

HTH + Cheers - Peter
 
J

Jerry Bodoff

Having worked in the Aerospace industry I have to agree
with all the comments. I also have had to deal with
government bureaucracy and idiotic paragraph and page
numbering. I haven't tried it but is it possible to open
the document, "read" each page and programatically create
the TOC using the footer page numbers?

Jerry B.
 
K

Kevin

Hi Peter,

Thanks for the reply.

As to the queries you had, the answers are as follows:

1. The current TOC has everything I need except the
ability to automatically produce the 3 digit page numbers
(1-2-3)

2. The TOC currently looks like this but as you can see I
can get Part # and Page # but not Part#, Section# and Page
# together.

PART 1 - INTRODUCTION 1-1
Section 1 - Safety 1-2
Background 1-3
Section 2 - Introduction 1-1
Purpose 1-2
PART 2 - DATA SUMMARY 2-1
Purpose 2-2
IDENTIFICATION 2-3
PART 3 - INSTALLATION INSTRUCTIONS 3-1

I would like to have it look like:

PART 1 - INTRODUCTION 1-1-1
Section 1 - Safety 1-1-2
Background 1-1-3
Section 2 - Introduction 1-2-1
Purpose 1-2-2
PART 2 - DATA SUMMARY 2-1-1
Purpose 2-1-2
IDENTIFICATION 2-1-3
PART 3 - INSTALLATION INSTRUCTIONS 3-1-1


3. The TOC field code currently used is: { TOC \F ENG \S
PART \* MERGEFORMAT }. \F ENG is to bring up only the TC
entries I need i.e. { Tc \F Eng \L 2 " Section 1 -
Safety } and the \S PART brings in the SEQ field code I
use to denote the Parts i.e. { SEQ Part\h \*
MERGEFORMAT }. When I try and add the SEQ field code for
the Section { SEQ Sect\h \* MERGEFORMAT} which works fine
in the footer ( {SEQ Part \c}-{SEQ Sect \c}-{Page} ) and
gives me 1-2-3 format, it will not work in the TOC field
code.

If you want, I can email you a copy of a skeleton document
in order to see the structure I have.

I am not a Word Guru so I may have to rethink my approach
to this problem and any help would be appreciated.

Thanks, Kevin
-----Original Message-----
Hi Kevin

If you can't change what you have as Jez' suggests can you answer a few questions.

- Does the TOC actually contain everything you want (apart from the numbering!)?
- Can you illustrate using 5 or 6 lines exactly what you want the TOC to look like?
- What is the format of a TOC entry, can you show field codes as well?

I have some ideas but until I have the above information
I do now know whether they will
 
P

Peter Hewett

Hi Kevin

In respect of question 3, I need to know how you actually tag an entry that the TOC picks
up, not the composition of the TOC field.

Cheers - Peter

Hi Peter,

Thanks for the reply.

As to the queries you had, the answers are as follows:

1. The current TOC has everything I need except the
ability to automatically produce the 3 digit page numbers
(1-2-3)

2. The TOC currently looks like this but as you can see I
can get Part # and Page # but not Part#, Section# and Page
# together.

PART 1 - INTRODUCTION 1-1
Section 1 - Safety 1-2
Background 1-3
Section 2 - Introduction 1-1
Purpose 1-2
PART 2 - DATA SUMMARY 2-1
Purpose 2-2
IDENTIFICATION 2-3
PART 3 - INSTALLATION INSTRUCTIONS 3-1

I would like to have it look like:

PART 1 - INTRODUCTION 1-1-1
Section 1 - Safety 1-1-2
Background 1-1-3
Section 2 - Introduction 1-2-1
Purpose 1-2-2
PART 2 - DATA SUMMARY 2-1-1
Purpose 2-1-2
IDENTIFICATION 2-1-3
PART 3 - INSTALLATION INSTRUCTIONS 3-1-1


3. The TOC field code currently used is: { TOC \F ENG \S
PART \* MERGEFORMAT }. \F ENG is to bring up only the TC
entries I need i.e. { Tc \F Eng \L 2 " Section 1 -
Safety } and the \S PART brings in the SEQ field code I
use to denote the Parts i.e. { SEQ Part\h \*
MERGEFORMAT }. When I try and add the SEQ field code for
the Section { SEQ Sect\h \* MERGEFORMAT} which works fine
in the footer ( {SEQ Part \c}-{SEQ Sect \c}-{Page} ) and
gives me 1-2-3 format, it will not work in the TOC field
code.

If you want, I can email you a copy of a skeleton document
in order to see the structure I have.

I am not a Word Guru so I may have to rethink my approach
to this problem and any help would be appreciated.

Thanks, Kevin

I do now know whether they will

HTH + Cheers - Peter
 
K

Kevin

Hi Peter,

As noted in the message below I use the TC entry such as
{Tc \F Eng \L2 "Section 1 - Safety"} which brings in the
required text for the TOC from the correct list and at the
required level. The \S switch in the TOC brings in the SEQ
number preceding the TC entry but I can only use one of
these switches (\S) in the TOC.

I hope this is what you meant.

Cheers, Kevin
-----Original Message-----
Hi Kevin

In respect of question 3, I need to know how you actually
tag an entry that the TOC picks
 
P

Peter Hewett

Hi Kevin

I need to look at the actual document to determine whether the idea's I have will work.
Email it to me at:

nospaminnerword (at) xtra (dot) co (dot) nz

remove the nospam and:
(at) = @
(dot) = .

MAKE SURE you clearly mark the subject line "microsoft.public.word.vba.general" and then
the subject matter or else the message wont get past the 2 spam filters!

Cheers - Peter


Hi Peter,

As noted in the message below I use the TC entry such as
{Tc \F Eng \L2 "Section 1 - Safety"} which brings in the
required text for the TOC from the correct list and at the
required level. The \S switch in the TOC brings in the SEQ
number preceding the TC entry but I can only use one of
these switches (\S) in the TOC.

I hope this is what you meant.

Cheers, Kevin
tag an entry that the TOC picks

HTH + Cheers - Peter
 
H

Howard Kaikow

I've not tried this.

Have you tried using the chapter number as part of the page number?
 
K

Kevin

Hi Peter,

Thanks and will do.

Cheers, Kevin
-----Original Message-----
Hi Kevin

I need to look at the actual document to determine
whether the idea's I have will work.
Email it to me at:

nospaminnerword (at) xtra (dot) co (dot) nz

remove the nospam and:
(at) = @
(dot) = .

MAKE SURE you clearly mark the subject
line "microsoft.public.word.vba.general" and then
 
K

Kevin

Hi Peter,

Did you receive my email?

Kevin
-----Original Message-----
Hi Peter,

Thanks and will do.

Cheers, Kevin
whether the idea's I have will work.
line "microsoft.public.word.vba.general" and then code
.
 
P

Peter Hewett

Hi Kevin

No sorry - nothings turned up. Try again and I'll watch out for it.

Cheers - Peter


Hi Peter,

Did you receive my email?

Kevin

HTH + Cheers - Peter
 
K

Kevin

Hi Peter,

I tried 2 more times today with and without the attachment.

I think you were clear with your email instructions but if
you do not receive anything by tomorrow please email me
at:

mekj (dot) mcgirr (at) dnd (dot) ca

Remove "me" and the same as you suggested earlier.

Thanks,

Kevin
 
P

Peter Hewett

Hi Kevin

I've just received your email. I have some serious commitments today but I'll take a look
at it tonight.

Cheers - Peter


Hi Peter,

I tried 2 more times today with and without the attachment.

I think you were clear with your email instructions but if
you do not receive anything by tomorrow please email me
at:

mekj (dot) mcgirr (at) dnd (dot) ca

Remove "me" and the same as you suggested earlier.

Thanks,

Kevin

HTH + Cheers - Peter
 
P

Peter Hewett

Hi Kevin

I've just emailed the completed template back to you. As always with TOC stuff it's
tricky to work with, but the code does what you require.

Let me know if you do *not* receive it.

Cheers - Peter


Hi Peter,

I tried 2 more times today with and without the attachment.

I think you were clear with your email instructions but if
you do not receive anything by tomorrow please email me
at:

mekj (dot) mcgirr (at) dnd (dot) ca

Remove "me" and the same as you suggested earlier.

Thanks,

Kevin
HTH + Cheers - Peter
 
K

Kevin

Hi Peter,

I want to first thank you for all your assistance and effort.

I tried the file you sent me on the machine at work (Office 2K) and then at
home on Office XP SP3 and they both had the same error.

The macro button displays but when activated comes up with the error "The
Macro cannot be found or has been disabled because of your Macro security
settings.".

I tried setting the macro security on "Low" but no change.

I went into the Tools-Macro-Macros and the "ReformatTOC" macro is listed but
it comes up with an error ("Sub or function not defined") when I try to edit
it. It seems not to be there.

I also tried the Visual Basic Editor and couldn't find it there either.

I can only guess that the macro was not included with the attachment you
sent me or I'm doing some wrong

Could you please resend the attachment with the macro?

Thanks again for all your assistance.

Cheers.

Kevin
 
P

Peter Hewett

Hi Kevin

Done!

Cheers - Peter

Hi Peter,

I want to first thank you for all your assistance and effort.

I tried the file you sent me on the machine at work (Office 2K) and then at
home on Office XP SP3 and they both had the same error.

The macro button displays but when activated comes up with the error "The
Macro cannot be found or has been disabled because of your Macro security
settings.".

I tried setting the macro security on "Low" but no change.

I went into the Tools-Macro-Macros and the "ReformatTOC" macro is listed but
it comes up with an error ("Sub or function not defined") when I try to edit
it. It seems not to be there.

I also tried the Visual Basic Editor and couldn't find it there either.

I can only guess that the macro was not included with the attachment you
sent me or I'm doing some wrong

Could you please resend the attachment with the macro?

Thanks again for all your assistance.

Cheers.

Kevin

HTH + Cheers - Peter
 

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