View Single Post
  #10   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default How to print double sided postcard using mail merge

Just as I began to work out the macro to adjust the data ......

:-) yes, see my reply to Doug on some of this stuff...

I still rather like the idea of manipulating the data. It should be
possible to adapt this method to work with any double sided format, but
this is stretching my programming skills and could take some time


One problem is that the label content on one side differs from the other,
i.e.the user cannot rely on built-in facilities such as Propagate Labels.
Another is that the label layout on one side may not be the same as the
other. it should be possible to work out for "side 2" from the various
dimensions on "side 1" but I haven't thought about it at a detailed level.

As for manipulating the data, the main advantage is IMO that you use the
data source like any other source (e.g. if you want to use ADDRESSBLOCK, you
are probably not going to be constrained by having to use SET fields. The
main problem seems to me to be that the specific code is probably going to
be different depending on the data source, although the general "duplicate &
sort " algorithm required for duplex printing should be the same for any
type of data source. Once people are committed to sorting their source data,
I suspect that most people would be quite happy to save in any format that
would allow them to use an off-the-shelf algorithm. The main problem is
likely to arise if they can't convert their data to that format without some
loss of information (e.g. if they have memo fields in Excel but they get
truncated during an export - that sort of thing).

One approach that might deal with a lot of data source types might be to
create a .mdb with tables linked to the real data source and work out some
algorithms and queries that would return everything required in the correct
sequence. But as a general-purpose solution, that would definitely fall foul
of data conversion problems (e.g. because of the sort of general problems
you get using ODBC drivers to access Excel data). Further, using SQL to
retrieve specified sets of records is one thing - using it to provide a
correct sequence of interleaved records may not be so straightforward,
although I think I can see the outline of a solution.

Peter Jamieson

"Graham Mayor" wrote in message
...
Just as I began to work out the macro to adjust the data ......

Frankly I believe you are better off without the AddressLayout fields -
otherwise it seems to work and should be easy to adapt to this task.

I still rather like the idea of manipulating the data. It should be
possible to adapt this method to work with any double sided format, but
this is stretching my programming skills and could take some time


--

Graham Mayor - Word MVP

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


Peter Jamieson wrote:
What about
a. you start with a label type mail merge main document. Suppose it
is a four card layout.
b. you duplicate the page and the table in it. You may also need to
asdjust the position and layout of the table on page 2
c. you have { NEXT } fields in cells 2 3 and 4 on page 1 but none on
page 2 d. suppose you want fields A and B on the front and fields B
and C on the back

In cell one on page one you have

{ SET B1 { MERGEFIELD B
}{ SET C1 { MERGEFIELD C
}{ MERGEFIELD A }
{ MERGEFIELD B }

in cell two you have

{ NEXT }{ SET B2 { MERGEFIELD B
}{ SET C2 { MERGEFIELD C
}{ MERGEFIELD A }
{ MERGEFIELD B }

and so on for cells 3 and 4.

On page two in cell one, you have

{ REF B2 }
{ REF C2 }

in cell two , you have

{ REF B1 }
{ REF C1 }

and so on (which way round exactly depends on the way the duplexing
works).
A really simple example seems to work - you can merge to a new
document to see. But
a. am I missing something?
b. ISTR that you can't SET and REF stuff such as ADDRESSBLOCK fields.

Peter Jamieson
"Doug Robbins - Word MVP" wrote in message
...
This cannot be done with mailmerge alone. What you need to do is
execute two merges, one for the front side and one for the back,
each one to a new document, then use a macro to combine those
documents into a single document taking alternate pages for each and
then print that combined document to your duplex printer.

I have previously set this sort of thing up for a person who was
merging two postcards to a sheet for which the following macro was
used to combine the documents. It will probably need modification
for your four cards per sheet:

Sub CombineDocs()

Dim sourcea As Document, sourceb As Document, target As Document

Dim i As Long, j As Long

Dim arange As Range

Set target = Documents.Open(FileName:="c:\target.doc")

Set sourcea = Documents.Open(FileName:="c:\sourcea.doc")

Set sourceb = Documents.Open(FileName:="c:\sourceb.doc")

j = 2 * sourcea.Tables(1).Rows.Count - 1

For i = 1 To j

target.Tables(1).Rows.Add

Next i

With sourcea.Tables(1)

For i = 1 To .Rows.Count

Set arange = .Rows(i).Cells(1).Range

arange.End = arange.End - 1

If i Mod 2 = 1 Then

j = 1

Else

j = 2

End If

target.Tables(1).Cell(2 * i - j, 1).Range.FormattedText =
arange

Next i

End With

With sourceb.Tables(1)

For i = 1 To .Rows.Count

Set arange = .Rows(i).Cells(1).Range

arange.End = arange.End - 1

If i Mod 2 = 1 Then

j = 1

Else

j = 0

End If

target.Tables(1).Cell(2 * i + j, 1).Range.FormattedText =
arange

Next i

End With

sourcea.Close wdDoNotSaveChanges

sourceb.Close wdDoNotSaveChanges

End Sub



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

"taxmom" wrote in message
...
I need to print a postcards using 4 cards per 8 1/2 x 11 paper. I
want to put merge specific data on the front of the card and the
clients name and mailing address on the back of the card. Can
anyone walk me through the steps to do this. I am not having any
problems with the mail merge function,
I just can't figure out how to do the double sided merge. I do have
duplex
printing capabilities