Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Numbering / May 2007

Tip: Looking for answers? Try searching our database.

HELP....Page Number Update Macro

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
kbrad28 - 03 May 2007 14:04 GMT
Hello,

  I am in search of a macro that updates the page numbers of my document
after a mail merge.
I found a code that would do this  several months back, but I have since lost
it after my computer crashed and I have no clue on where I found it. I am
hoping someone here my have the code or something similar to it.

To better describe what the macro did; I would create a letter mail merge,
but every new record reset back to 1, but with the macro code I am looking
for actually placed my document in sequential order(ie.1,2,3,etc.) If someone
out there knows what I am talking be please respond. I will apprectiate any
help on this. Thanks a lot!!

Kbrad28
Doug Robbins - Word MVP - 03 May 2007 14:47 GMT
Use a { Section } field instead of a { Page Field }

Signature

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

> Hello,
>
[quoted text clipped - 14 lines]
>
> Kbrad28
kbrad28 - 03 May 2007 15:07 GMT
Thanks for your response, but could you explain how I go about using a
{section} field. I am a beginner in doing this. Thanks again!

>Use a { Section } field instead of a { Page Field }
>
[quoted text clipped - 3 lines]
>>
>> Kbrad28
Doug Robbins - Word MVP - 03 May 2007 15:17 GMT
If you Press Alt+F9, in your document where the page number appears, you
will see { PAGE }  Replace that with { SECTION } then press Alt+F9 to toggle
off the field codes.

Signature

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

> Thanks for your response, but could you explain how I go about using a
> {section} field. I am a beginner in doing this. Thanks again!
[quoted text clipped - 6 lines]
>>>
>>> Kbrad28
kbrad28 - 03 May 2007 15:34 GMT
Thanks, I will try that and let you know how it goes.

>If you Press Alt+F9, in your document where the page number appears, you
>will see { PAGE }  Replace that with { SECTION } then press Alt+F9 to toggle
[quoted text clipped - 5 lines]
>>>>
>>>> Kbrad28
kbrad28 - 03 May 2007 15:40 GMT
Eureka!!! Everything works as it should. Thanks!

>If you Press Alt+F9, in your document where the page number appears, you
>will see { PAGE }  Replace that with { SECTION } then press Alt+F9 to toggle
[quoted text clipped - 5 lines]
>>>>
>>>> Kbrad28
kbrad28 - 03 May 2007 16:24 GMT
One issue, the { SECTION }  works, but if one of my letters run longer then
one page it doesn't  go to the next number it stays at page one, how do I go
about to correct this?

>If you Press Alt+F9, in your document where the page number appears, you
>will see { PAGE }  Replace that with { SECTION } then press Alt+F9 to toggle
[quoted text clipped - 5 lines]
>>>>
>>>> Kbrad28
Doug Robbins - Word MVP - 03 May 2007 18:20 GMT
In that case, revert to the use of the { PAGE } field for the page numbers,
and execute the merge to a new document and then run the following macro on
that document

Dim i As Long
With ActiveDocument
   For i = 2 To .Sections.Count
       .Sections(i).Headers(wdHeaderFooterPrimary).PageNumbers.RestartNumberingAtSection
= False
   Next i
End With

Signature

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

> One issue, the { SECTION }  works, but if one of my letters run longer
> then
[quoted text clipped - 12 lines]
>>>>>
>>>>> Kbrad28
kbrad28 - 03 May 2007 19:00 GMT
Thanks so much Mr. Robbins for your responses! I just have one more question.
Is it possible to format a macro to use a specific font, size, color, etc?

>In that case, revert to the use of the { PAGE } field for the page numbers,
>and execute the merge to a new document and then run the following macro on
[quoted text clipped - 13 lines]
>>>>>>
>>>>>> Kbrad28
Doug Robbins - Word MVP - 03 May 2007 20:43 GMT
font name, size and color are not characteristics of a macro, they are
charactistics of characters.  You can certainly use a macro to apply such
characteristics.  The following code will apply the font, size and color
indicated to the text that is selected:

With Selection.Font
   .Name = "Arial"
   .Size = 24
   .Color = wdColorBrightGreen
End With

Signature

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

> Thanks so much Mr. Robbins for your responses! I just have one more
> question.
[quoted text clipped - 20 lines]
>>>>>>>
>>>>>>> Kbrad28
kbrad28 - 04 May 2007 14:13 GMT
Thanks this is exactly what I was looking for. Everything works!! Thank you.

>font name, size and color are not characteristics of a macro, they are
>charactistics of characters.  You can certainly use a macro to apply such
[quoted text clipped - 12 lines]
>>>>>>>>
>>>>>>>> Kbrad28
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.