Merge field source data field
I have a project that uses Excel for data capture and then generates a letter based on a Word template.
I have an Excel workbook with a hidden worksheet containing all of the fields and data that I want to populate in a Word template.
I am adding a new field in the Word template to be populated from Excel.
I will modify the Excel workbook to create and populate the data.
I have a bunch of existing Excel workbooks that will not have the new field.
I want to be able to perform a check in the Word template to use the data in the Excel field IF the field exists (new workbooks). If the field does not exist (old workbooks), then use " " in the Word template.
If I write the code as: {IF (MERGEFIELD FacilityName} <> "" "FacilityName" ""} seems like it is looking for the field named FacilityName in my Excel workbook (which may or may not exist).
Is there a way to write what I am looking for in the mergefield code of the Word Template?
|