Page 1 of 1

Conditions in OpenDoPE

PostPosted: Tue Feb 14, 2012 7:14 pm
by Ron
I am using OpenDoPE to insert content controls.

I want to use conditions in the content control.

Is there any tutorial or sample for conditions? Can someone please point me to the right resource?

I want to display different tables depending on value of a xml tag.

Any help would be much appreciated.

Thanks in advance.


Cheers

Re: Conditions in OpenDoPE

PostPosted: Wed Feb 15, 2012 12:00 am
by jason
Hi Ron

Have you seen the Word Add-In Walkthrough document?

If you want to display different tables depending on the value of an xml tag, the easiest approach is to put each table inside a rich text content control, and add an appropriate condition to the content control.

If the value of your XML tag is literal 'true' or 'false' (ie you will have 2 tables), then the condition's XPath can simply point to the node.

If it will have other values (eg 'red', 'green', 'blue'), then your XPath will have to test whether the value is what you want (the expression must evaluate to true or false).

For the contents of the conditional content control to be inserted, the condition must evaluate to true.

The invoice document sample has a condition in it.

cheers .. Jason

Re: Conditions in OpenDoPE

PostPosted: Wed Feb 15, 2012 5:06 pm
by Ron
Thanks a lot Jason for pointing me to the right direction.

I have achieved what I wanted. You made my day.

Cheers