M
Mary
I use Word 2000 in Windows XP. I'm working on a document where a number of
text items are pulled from Document Properties using the DOCPROPERTY field.
Is there a way to supress the fields if blank? For example, in a cover
letter, the codes for the addressee fields are as follows:
[ DOCPROPERTY "CCname" \* MERGEFORMAT ]
[ DOCPROPERTY "CCadd1" \* MERGEFORMAT ]
[ DOCPROPERTY "CCadd2" \* MERGEFORMAT ]
[ DOCPROPERTY "CCtownpostcode" \* MERGEFORMAT ]
Each of these field codes is followed by a regular paragraph marker. If
Address 2 is blank in Doc Properties, I still get a blank line. Is there a
way to suppress the third line, referring to add2, if there is no matching
entry? I think the solution probably lies in combining two instructions
within a single field code and putting a paragraph return in the middle of
it. I suspect the IF function is also involved but just can figure it out.
There does not seem to be a way to do this using the Insert Field command,
so presumably it has to be set up manually?
text items are pulled from Document Properties using the DOCPROPERTY field.
Is there a way to supress the fields if blank? For example, in a cover
letter, the codes for the addressee fields are as follows:
[ DOCPROPERTY "CCname" \* MERGEFORMAT ]
[ DOCPROPERTY "CCadd1" \* MERGEFORMAT ]
[ DOCPROPERTY "CCadd2" \* MERGEFORMAT ]
[ DOCPROPERTY "CCtownpostcode" \* MERGEFORMAT ]
Each of these field codes is followed by a regular paragraph marker. If
Address 2 is blank in Doc Properties, I still get a blank line. Is there a
way to suppress the third line, referring to add2, if there is no matching
entry? I think the solution probably lies in combining two instructions
within a single field code and putting a paragraph return in the middle of
it. I suspect the IF function is also involved but just can figure it out.
There does not seem to be a way to do this using the Insert Field command,
so presumably it has to be set up manually?