View Single Post
  #2   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 Using mail merge to print front and back of postcards

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

"Kim" wrote in message
...
I need to print personalized post cards - with message on one side using
merged fields from Excel list - then mailing address on the other side of
the
post card. First I printed the personalized message side of the card,
then
created the personalized mailing address side, put the postcards that had
the
first side printed back in the printer, then told printer to reverse
order.
The problem is that the personalized info is reversed horizontally. In
other
words, if looking at the one side person A info is on the left, and person
B
is on the right. When I print side 2, person B is on the left and person
A
is on the right - so the personalized message is not addressed to the
correct
person.
--
Kim