Merge fields for quotation template

I

ivory_kitten

Our company database sends information to a word document using merge fields
which can then be used in templates. I want to create a quote template -
there can be up to 12 lines for pricing however I only want to insert the
extra rows if they are used. How can I do this?
 
D

Doug Robbins - Word MVP

Maybe best to use code to iterate through the source, adding rows to a table
and populating them as required.

Sounds like you are probably trying to perform a "multiple items per
condition (=key field)" mailmerge which Word does not really have the
ability to do:

See the "Group Multiple items for a single condition" item on fellow MVP
Cindy Meister's website at

http://homepage.swissonline.ch/cindymeister/mergfaq1.htm#DBPic


Or take a look at the following Knowledge Base Article

http://support.microsoft.com/default.aspx?scid=kb;en-us;211303


http://www.knowhow.com/Guides/CompoundMerges/CompoundMerge.htm


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

ivory_kitten

Our company database puts the info into another word document called
mergefields and then you import them from that in to the quote template.
There is no way around this because its the way the program has been
designed. The fields are called QuoteLine1, QuoteLine2, QuoteLine3 etc. up
to 12 lines.

Not sure if word is able to add additional lines to the table depending on
whether there is a value for these?
 
M

macropod

Hi ivory_kitten,

If you're happy to work with the items appearing in a list, rather than in
separate cells in a table, you could code each of the fields after the first
as:
If your mergefields are values (i.e. not text) -
{={MERGEFIELD QuoteLine2} \# "¶$,0.00"}
{={MERGEFIELD QuoteLine3} \# "¶$,0.00"}
If your mergefields have text -
{IF{MERGEFIELD QuoteLine2} <> "" "¶{MERGEFIELD QuoteLine2}"}
{IF{MERGEFIELD QuoteLine3} <> "" "¶{MERGEFIELD QuoteLine3}"}

etc, where the '¶' is a paragraph mark or a line-feed.

Cheers
 

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