Word field formatting

R

Ryck J

I am trying to create a mailmerge doc with the data coming from Excel. I have a "skip record if data field is blank" field that draws from the excel sheet. The Excel field is a formula that reads if(w2>w3,w2,""). In the spreadsheet, it comes up blank, but Word reads it as "0". How can I fix this?
 
D

Doug Robbins - Word MVP

Toggle on the field codes using Alt+F9 and add the following formatting
switch inside the closing }

\# "#; ;"

Replace the # inside the quotes with however you want the number to be
formatted, add a formatting picture of negative numbers if required between
the semi-colons.

It's not having anything after the last semi-colon that controls the display
of a zero value.

See "Formatting Word fields with switches" on fellow MVP Graham Mayor's
website at

http://www.gmayor.com/formatting_word_fields.htm


--
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
Ryck J said:
I am trying to create a mailmerge doc with the data coming from Excel. I
have a "skip record if data field is blank" field that draws from the excel
sheet. The Excel field is a formula that reads if(w2>w3,w2,""). In the
spreadsheet, it comes up blank, but Word reads it as "0". How can I fix
this?
 
D

Doug Robbins - Word MVP

Sorry, I did not read your question clearly enough. I thought all you were
wanting to do was suppress the 0

Have you tried using {SKIPIF{MERGEFIELD To_Print} = 0 }

--
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
 

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