Special numbering sequence for a mail merge job

Y

Yblitzka

I have a mail merge job in word (2003).

I need to place a number code at the bottom of each page. The code is:
STATIC_CODE RECORDNUMBER_CODE PAGENUMBER_CODE

Where:
Static_code = 011111
RecordNumber_code = the last five digits of "0000RECORDNUMBER"
((Right, string,5) for you programmers)
PageNumber_code = the last three digits of "00CURRENTPAGENUMBER"
((Right, string,3))


My first page looks like this: 01111100001001

I'm not sure how to do this - I want to make a little macro that can
calculate the strings for the record number and the page number. Can someone
give me some direction on this?

TIA,
 
D

Doug Robbins - Word MVP

Use the following field construction

011111{ MERGEREC \# "0000#" }{PAGE \# "00# }

You must use Ctrl+F9 to insert each pair of field delimiters and Alt+F9 to
toggle off their display.

--
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, originally posted via msnews.microsoft.com
 
M

macropod

Hi Doug,

I think that should be:
011111{ MERGEREC \# "0000#" }{PAGE \# "00#"}
or
011111{ MERGEREC \# 00000 }{ PAGE \# 000 }
 
M

macropod

Hi Yblitzka,

Further to Doug's reply, if your 'RECORDNUMBER' is the name of a field in your data source, use the following field construction:
011111{=MOD({MERGEFIELD RECORDNUMBER},10000} \# 00000}{PAGE \# 000}
 

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