Avatar of Laurence Martin
Laurence Martin
Flag for United Kingdom of Great Britain and Northern Ireland asked on

Conditional Text in Word with XML data source

I have a potential client that is using an ERP system called Priority which produces various documents such as invoices using a Word template with mapped XML fields.

Sometimes they will produce a single document, sometimes it is a batch.

They want the document to say different things depending on the data.

If this were a Word mail merge I would use a If..Then..Else field in the mail merge, but they tell me that isn't working.  I guess that is because they aren't running a Word merge.

Can you use IF fields in this XML situation, if so how?
XMLMicrosoft Word

Avatar of undefined
Last Comment
Laurence Martin

8/22/2022 - Mon
John Korchok

The answer will depend on how Priority operates. Here's their contact page, where you can request a demo and ask questions: Priority Contact Page
Laurence Martin

OK, let's forget about Priority for a moment.  I'd like to learn more about IF fields.

How do they work when it's not a mailmerge?

The Microsoft website just says {If order>100 "truetext" "falsetext"}.  What is "Order"? A bookmark?

If I want to reference a Content Control, how do I do that?
John Korchok

View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Laurence Martin

Thanks John,

I thought that Content Controls would be difficult.

My question was all about the field code, without using VBA,

We are waiting to see what Priority say.

I hope you are staying safe and well.
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes