Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Jojo Jojo is offline
external usenet poster
 
Posts: 3
Default Print Section Number on page

I have a mail merge document to print postcards with duplex.
This means 2 pages per section and 4 records per section.

I want to print the section number but am having trouble.
I tried Insert Field... {Section} and {SectionPages} but
neither one worked.

Anybody have an idea?
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Print Section Number on page

See if http://www.gmayor.com/duplex_merge_data.htm helps?

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


Jojo wrote:
I have a mail merge document to print postcards with duplex.
This means 2 pages per section and 4 records per section.

I want to print the section number but am having trouble.
I tried Insert Field... {Section} and {SectionPages} but
neither one worked.

Anybody have an idea?



  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default Print Section Number on page

There are a number of fields that will not survive the execution of a mail
merge and the Section and SectionPages fields are two of them.

It might be best to put the numbers that you want in a field in the data
source.

You may be interested in the following method of creating post cards with
data printed on both sides.

To do this, you would use a two page form letter type mail merge main
document with the text and merge fields set up for each side of the card in
that document.

Then, with your data source which must be in the form of a table in a Word
document open as the active document, you would run the following macro.
This will ask you how many cards there are across and how many down, and
then it will create a new data source with the records duplicated in the
correct order so that when you attach this new data source to the form
letter type mail merge main document, and execute the merge, the required
information will appear on each side of the card.


Dim i As Long, j As Long, k As Long, l As Long, n As Long, m As Long
Dim dtable As Table
Dim arec As Range
Dim dsource As String

dsource = ActiveDocument.FullName
Set dtable = ActiveDocument.Tables(1)

GoThe
m = InputBox("Enter the number of cards across (1 or 2)", "Duplex Labels")
If Not IsNumeric(m) Then
GoTo GoThere
ElseIf m 1 Or m 2 Then
GoTo GoThere
End If

GoHe
k = InputBox("Enter the number of rows of cards on the sheet.", "Duplex
Labels")
If Not IsNumeric(k) Then
GoTo GoHere
ElseIf m 1 Then
GoTo GoHere
End If

dsource = Left(dsource, InStr(dsource, ".") - 1) & " - Duplex for " & m &
"x" & k & ".doc"
If m = 1 Then
i = (dtable.Rows.Count - 1) Mod k
If i 0 Then
For j = 1 To k - i
dtable.Rows.Add
Next j
End If
For l = dtable.Rows.Count - (k - 1) To k + 1 Step -k
For j = 1 To k
dtable.Rows.Add (dtable.Rows(l))
Next j
Next l
For j = 1 To k
dtable.Rows.Add
Next j
For n = 1 To k
For i = dtable.Rows.Count + 1 - n To k + 2 - n Step -2 * k
For j = 1 To dtable.Columns.Count
Set arec = dtable.Cell(i - k, j).Range
arec.End = arec.End - 1
dtable.Cell(i, j).Range = arec
Next j
Next i
Next n
Else
k = 2 * k
i = (dtable.Rows.Count - 1) Mod k
If i 0 Then
For j = 1 To k - i
dtable.Rows.Add
Next j
End If
For l = dtable.Rows.Count - (k - 1) To k + 1 Step -k
For j = 1 To k
dtable.Rows.Add (dtable.Rows(l))
Next j
Next l
For j = 1 To k
dtable.Rows.Add
Next j
For n = 1 To k
If n Mod 2 = 1 Then
l = -1
Else
l = 1
End If
For i = dtable.Rows.Count + 1 - n To (2 * k + 2 - n) Step -2 * k
For j = 1 To dtable.Columns.Count
Set arec = dtable.Cell(i - k + l, j).Range
arec.End = arec.End - 1
dtable.Cell(i, j).Range = arec
Next j
Next i
Next n
End If
ActiveDocument.SaveAs dsource


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

"Jojo" wrote in message
...
I have a mail merge document to print postcards with duplex.
This means 2 pages per section and 4 records per section.

I want to print the section number but am having trouble.
I tried Insert Field... {Section} and {SectionPages} but
neither one worked.

Anybody have an idea?



  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Jojo Jojo is offline
external usenet poster
 
Posts: 3
Default Print Section Number on page

Doug,

Thanks for the thorough reply. The explanation of those fields not
"surviving" a merge allowed me to focus on another direction. I'm
always looking for simple solutions so I wanted to stay away from VB.
Plus I thought I had come across another solution. So with my
refocus, I found "Formula" under Field Codes and came up with:
{ =int(({ MERGEREC }+4)/4) \# "0" }
The 4's are because I have 4 records per page.

Regards...

Doug Robbins - Word MVP wrote:
There are a number of fields that will not survive the execution of a mail
merge and the Section and SectionPages fields are two of them.

It might be best to put the numbers that you want in a field in the data
source.

You may be interested in the following method of creating post cards with
data printed on both sides.

To do this, you would use a two page form letter type mail merge main
document with the text and merge fields set up for each side of the card in
that document.

Then, with your data source which must be in the form of a table in a Word
document open as the active document, you would run the following macro.
This will ask you how many cards there are across and how many down, and
then it will create a new data source with the records duplicated in the
correct order so that when you attach this new data source to the form
letter type mail merge main document, and execute the merge, the required
information will appear on each side of the card.


Dim i As Long, j As Long, k As Long, l As Long, n As Long, m As Long
Dim dtable As Table
Dim arec As Range
Dim dsource As String

snip
  #5   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Jojo Jojo is offline
external usenet poster
 
Posts: 3
Default Print Section Number on page

Graham,

It appears that that page only deals with formatting, which
I was able to figure out. In fact I had problems because
I needed to use Text Boxes and using standard Merge and Word
fields didn't work. I had to use Bookmarks. Anyway, I
found "Formula" under Field Codes and came up with:
{ =int(({ MERGEREC }+4)/4) \# "0" }
The 4's are because I have 4 records per page.

Regards...

Graham Mayor wrote:
See if http://www.gmayor.com/duplex_merge_data.htm helps?

Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Section breaks add page number without adding a page rontiara Page Layout 3 January 26th 08 04:38 AM
why does page number revert to earlier number after section chang. owend Page Layout 3 September 18th 06 08:22 AM
section page break delete page number Carla New Users 1 December 8th 05 09:07 PM
How do I print page numbers in only 1 section of a multi-section . moniblues Microsoft Word Help 1 January 12th 05 12:57 AM
section page numbers in heading and total page number in footing Desparate Word user Microsoft Word Help 4 January 7th 05 10:01 PM


All times are GMT +1. The time now is 06:00 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"