View Single Post
  #3   Report Post  
Posted to microsoft.public.word.docmanagement
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default Printing Variable Label Quantities from a Merge

I can export the database

What type of database is it? (Excel workbook, access, some other
database?) You may be able to do something directly in there.

Otherwise, if
a. you can get an export like this

Product Quantity
A 1
B 5
C 7
..
..

and you know the maximum Qty (let's say it is 10), then
b. you can do this without having to resort to VBA:-

1. Create a directory (catalog) merge
Put the following fields in it
{ IF { MERGEFIELD QUANTITY } 0 "{ MERGEFIELD PRODUCT }
" }{ IF { MERGEFIELD QUANTITY } 1 "{ MERGEFIELD PRODUCT }
" }{ IF { MERGEFIELD QUANTITY } 2 "{ MERGEFIELD PRODUCT }
" }{ IF { MERGEFIELD QUANTITY } 3 "{ MERGEFIELD PRODUCT }
" }{ IF { MERGEFIELD QUANTITY } 4 "{ MERGEFIELD PRODUCT }
" }{ IF { MERGEFIELD QUANTITY } 5 "{ MERGEFIELD PRODUCT }
" }{ IF { MERGEFIELD QUANTITY } 6 "{ MERGEFIELD PRODUCT }
" }{ IF { MERGEFIELD QUANTITY } 7 "{ MERGEFIELD PRODUCT }
" }{ IF { MERGEFIELD QUANTITY } 8 "{ MERGEFIELD PRODUCT }
" }{ IF { MERGEFIELD QUANTITY } 9 "{ MERGEFIELD PRODUCT }
" }

NB, all the {} need to be the special field code braces you can enter
using ctrl-F9

2. Merge to a new document. You should have one column containing the
right number of rows for each PRODUCT. Manually insert the column header
PRODUCT, save and close the document and use it as the data source for
your label merge.

Peter Jamieson

http://tips.pjmsn.me.uk

On 19/02/2010 22:53, Wake Manor wrote:
Greetings;

I am trying to figure out how to print variable quantities of labels based
on a "quantity" field in a File. The purpose is to print out inventory
labels. I can export the database which will have, for example, the following
fields.

Product: A B C
Qty: 1 5 7

I can set up the basic merge (the Product line), but I want to be able to
tell Word to print out ONE label of "A", FIVE labels of "B" and SEVEN labels
of "C".

Help please!!!

Thanks