we are using WSS3 document libraries together with Word 2003. The
document template we are using contains field codes in the header &
footer that reference metadata from WSS.
For example the header displays the fields ZZ_Content_Type and
ZZ_ApprovalDate from WSS.
Document Type: { DOCPROPERTY "ZZ_Content_Type" \* MERGEFORMAT }
Approved Date: { DOCPROPERTY "ZZ_ApprovalDate"
\@"YYYY-MM-DD" \* MERGEFORMAT }
The problem we have is when a field in SharePoint is not set to a value,
the DOCPROPERTY for that field is not available in Word 2003. Instead
we get "Error! Unknown document property name.".
In the case of metadata Approval Date we don't want to set it to a
value until the document has been approved. It will not be set from the
start and so the DOCPROPERTY for that field will fail in Word 2003.
I've tried to solve it with if statement in the field code in Word,
but no success so far with this:
{IF {DOCPROPERTY "ZZ_ApprovalDate "} <> " Error! Unknown document
property name." {DOCPROPERTY "ZZ_ApprovalDate" \@"YYYY-MM-DD" \*
MERGEFORMAT}" ""}
Anyone else with suggestions how to solve this to display nothing if
nothing is set in WSS, and display the correct metadata date when it is
set in WSS, please?
Do you know someone who can help? Share a link to this thread on twitter, or facebook.