RD field vba Jonathon West

P

Patricia

I have downloaded and used the macro created by Jonathon West to restart the
page numbers on individual documents in order to create a table of contents.

I have played around with the macro to endeavour to get the first document
to start at 1 (when I run the macro it continues numbering from the table of
contents page) - to no avail, as I'm not a VBA person.

My question is: would there be anyone who can point me in the right
direction. The macro is just great, but really need to start the numbering
for the group of documents at 1.

Would really appreciate any help.
Thanks in anticipation.
 
J

Jonathan West

Hi patricia

I'm assuming your mean this article

Creating a Table of Contents Spanning Multiple Documents
http://pubs.logicalexpressions.com/Pub0009/LPMArticle.asp?ID=148

In order to make the page number for the first chapter start at 1 instead of
continuing after the table of contents, you need change just one line of the
macro

Early on in the macro there is the following line

iLastPage = Selection.Information(wdActiveEndAdjustedPageNumber)

Change it to this

iLastPage = 0

(Beware, this like of code is repeated late on. You *don't* change it
there.)

--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org
 

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