INCLUDETEXT dynamic file name?
Is it possible to have the file name for the INCLUDETEXT dynamically set using one of the merge fields?
Something like:
INCLUDETEXT MERGEFIELD filename
rather than
INCLUDETEXT test.doc
Here is a sample of the code we currently have and we'd like to pass in the file name using the merge data rather than hard coding all of this.
{ IF { MERGEFIELD Lettertype \* FirstCap \* CHARFORMAT} = "Autumn Crisp" { INCLUDETEXT c:\\ECMarketing\\doc\\Autumn-fact.doc \* MERGEFORMAT } }
{ IF { MERGEFIELD Lettertype \* FirstCap \* CHARFORMAT} = "CandyCrisp" { INCLUDETEXT c:\\ECMarketing\\doc\\Candycrisp-fact.doc \* MERGEFORMAT } }
{ IF { MERGEFIELD Lettertype \* FirstCap \* CHARFORMAT} = "Cortland" { INCLUDETEXT c:\\ECMarketing\\doc\\Cortland-fact.doc \* MERGEFORMAT } }
{ IF { MERGEFIELD Lettertype \* FirstCap \* CHARFORMAT} = "Empire" { INCLUDETEXT c:\\ECMarketing\\doc\\Empire-fact.doc \* MERGEFORMAT } }
{ IF { MERGEFIELD Lettertype \* FirstCap \* CHARFORMAT} = "Fortune" { INCLUDETEXT c:\\ECMarketing\\doc\\Fortune-fact.doc \* MERGEFORMAT } }
{ IF { MERGEFIELD Lettertype \* FirstCap \* CHARFORMAT} = "Fuji" { INCLUDETEXT c:\\ECMarketing\\doc\\Fuji-fact.doc \* MERGEFORMAT } }
I've been researching this and can't find any examples using a merge field for the file name.
Thank you!!
|