View Single Post
 
Old 08-29-2015, 01:04 AM
gmayor's Avatar
gmayor gmayor is offline Windows 7 64bit Office 2010 32bit
Expert
 
Join Date: Aug 2014
Posts: 4,144
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

On the face of it from your description, this is a simple merge using conditional fields e.g.

{ IF { MERGEFIELD "Product A" } <> "" "Product A : { MERGEFIELD "Product A" }¶" }{ IF { MERGEFIELD "Product B" } <> "" "Product B : { MERGEFIELD "Product B" }¶" }{ IF { MERGEFIELD "Product C" } <> "" "Product C : { MERGEFIELD "Product C" }¶" }{ IF { MERGEFIELD "Product D" } <> "" "Product D : { MERGEFIELD "Product D" }¶" }

(the field bracket pairs are inserted with CTRL+F9). Press the enter key at ¶.

If there is a value in 'Product A' the field will produce 'Product A : 1%' followed by a paragraph break, otherwise it will do nothing. Similarly the other fields. Modify as required.

The only minor proviso relates to the percentage value in the data source. If necessary use a formatting switch to give the correct result - see http://www.gmayor.com/formatting_word_fields.htm
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote