All results on one document

S

Scruft

Hello,

I have a one-page document that uses a source with multiple records, but I
want the results all to be shown on the one document when it's merged, rather
than a new page for every record.

Does anyone have a suggestion on doing this?

Thanks.
 
D

Doug Robbins - Word MVP

Use a catalog (or if you are using Word XP or later, it is called
"directory") type mailmerge main document. Have one empty paragraph mark at
the end of the mailmerge main document.

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

Graham Mayor

Change the merge document type from letter to directory/catalog.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
S

Scruft

Hi Guys,

Thanks for the quick responses. Unfortunately my situation isn't as simple
as I made it sound. The document I have is a page full of pictures and
descriptions of many of the products we sell. Each one has a small section
for the qty ordered to be shown - this is my merge field.

Because there are many products on the page, and the source of the data is
dynamic (hence I can't predict what order the products will be listed in) I
have used an {IF} statement to match the product code in the data source with
the code of the product on the page, eg:
{IF {MERGEFIELD prod_code} = "Product1" "{MERGEFIELD prod_qty}" ""}

This works perfectly, it brings across the right quantities and it's all
perfect. Only problem is that I get a new page for every product that's in
the source data - I want them all on the one page.

Does this shed any light on the situation?

Thanks.
 
D

Doug Robbins - Word MVP

I can't quite visualize how that is working, but if you want to send me the
mail merge main document and a typical data source file, I will take a look
and see what can be done with it.

Sent it to dkr[at]mvps.org replace [at] with @

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

Graham Mayor

You are right - it isn't simple, and may not even be possible in Word.

There are essentially three types of merge
Form letter - which will produce one page for each record
Directory - which will reproduce whatever you have on the page for each
record and is normally used for lists
Labels - which will produce one record for each cell of a table.

Yours is a fourth type :(

You *may* be able to create a label merge comprising your images and your
quantities - http://www.gmayor.com/mail_merge_graphics.htm - but frankly I
think this is beyond the normal usage of Word

Maybe Doug or Peter will come up with some ideas?

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
P

Peter Jamieson

Like Doug, I can't quite visualize this.

It sounds like you're starting from a pre-defined page with a known set of
products. Does that mean that you have a catalog consisting of (say)
hundreds of pages, that each page is in a separate file, and that you are
doing a merge for each page?

If it's something like that, maybe you don't need a merge and could use {
DATABASE } fields instead (it depends partly on your data source).

e.g. for an Access database, use something along the following lines for
each product

{ DATABASE \d "c:\\mydbs\\mydb.mdb" \s "SELECT prod_qty FROM [products]
WHERE [products].[prod_code] = 'Product1' \#0 }

Peter Jamieson
 
D

Doug Robbins - Word MVP

The OP sent me the document and a datasource in the form of an Excel
spreadsheet, though he mentioned that was not the original data source. The
part of the document into which he was trying to merge the data contained a
table with a product in each cell and an If...then...Else... mergefield that
was intended to insert the quantity for the product in that cell, if the
product code in the record matched that of the product in the cell.

I have sent him the following reply:

"IF the records in your data source were in the same order as the items in
respect of which you want to insert the quantities, (which they are NOT),
and, you had a record in the data source for each item (which you do NOT),
then you could use a <<Next Record>> field before each item (except the
first).



I note however that the document is not fully developed and I suspect that
what you are going to end up wanting to do is create a series of documents
in which each document contains the order of possibly multiple items for a
single client.



Quite frankly, Mail Merge is not really the best tool for that. The best
way to do it will depend on what is the real data source."



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

Peter Jamieson said:
Like Doug, I can't quite visualize this.

It sounds like you're starting from a pre-defined page with a known set of
products. Does that mean that you have a catalog consisting of (say)
hundreds of pages, that each page is in a separate file, and that you are
doing a merge for each page?

If it's something like that, maybe you don't need a merge and could use
{ DATABASE } fields instead (it depends partly on your data source).

e.g. for an Access database, use something along the following lines for
each product

{ DATABASE \d "c:\\mydbs\\mydb.mdb" \s "SELECT prod_qty FROM [products]
WHERE [products].[prod_code] = 'Product1' \#0 }

Peter Jamieson

Scruft said:
Hi Guys,

Thanks for the quick responses. Unfortunately my situation isn't as
simple
as I made it sound. The document I have is a page full of pictures and
descriptions of many of the products we sell. Each one has a small
section
for the qty ordered to be shown - this is my merge field.

Because there are many products on the page, and the source of the data
is
dynamic (hence I can't predict what order the products will be listed in)
I
have used an {IF} statement to match the product code in the data source
with
the code of the product on the page, eg:
{IF {MERGEFIELD prod_code} = "Product1" "{MERGEFIELD prod_qty}" ""}

This works perfectly, it brings across the right quantities and it's all
perfect. Only problem is that I get a new page for every product that's
in
the source data - I want them all on the one page.

Does this shed any light on the situation?

Thanks.
 
P

Peter Jamieson

Doug

Thanks for the heads-up

Peter
Doug Robbins - Word MVP said:
The OP sent me the document and a datasource in the form of an Excel
spreadsheet, though he mentioned that was not the original data source.
The part of the document into which he was trying to merge the data
contained a table with a product in each cell and an If...then...Else...
mergefield that was intended to insert the quantity for the product in
that cell, if the product code in the record matched that of the product
in the cell.

I have sent him the following reply:

"IF the records in your data source were in the same order as the items in
respect of which you want to insert the quantities, (which they are NOT),
and, you had a record in the data source for each item (which you do NOT),
then you could use a <<Next Record>> field before each item (except the
first).



I note however that the document is not fully developed and I suspect that
what you are going to end up wanting to do is create a series of documents
in which each document contains the order of possibly multiple items for a
single client.



Quite frankly, Mail Merge is not really the best tool for that. The best
way to do it will depend on what is the real data source."



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

Peter Jamieson said:
Like Doug, I can't quite visualize this.

It sounds like you're starting from a pre-defined page with a known set
of products. Does that mean that you have a catalog consisting of (say)
hundreds of pages, that each page is in a separate file, and that you are
doing a merge for each page?

If it's something like that, maybe you don't need a merge and could use
{ DATABASE } fields instead (it depends partly on your data source).

e.g. for an Access database, use something along the following lines for
each product

{ DATABASE \d "c:\\mydbs\\mydb.mdb" \s "SELECT prod_qty FROM [products]
WHERE [products].[prod_code] = 'Product1' \#0 }

Peter Jamieson

Scruft said:
Hi Guys,

Thanks for the quick responses. Unfortunately my situation isn't as
simple
as I made it sound. The document I have is a page full of pictures and
descriptions of many of the products we sell. Each one has a small
section
for the qty ordered to be shown - this is my merge field.

Because there are many products on the page, and the source of the data
is
dynamic (hence I can't predict what order the products will be listed
in) I
have used an {IF} statement to match the product code in the data source
with
the code of the product on the page, eg:
{IF {MERGEFIELD prod_code} = "Product1" "{MERGEFIELD prod_qty}" ""}

This works perfectly, it brings across the right quantities and it's all
perfect. Only problem is that I get a new page for every product that's
in
the source data - I want them all on the one page.

Does this shed any light on the situation?

Thanks.

:

Change the merge document type from letter to directory/catalog.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

Scruft wrote:
Hello,

I have a one-page document that uses a source with multiple records,
but I want the results all to be shown on the one document when it's
merged, rather than a new page for every record.

Does anyone have a suggestion on doing this?

Thanks.
 

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