Page 1 of 1

Conditional content control in C#

PostPosted: Mon Jul 31, 2017 4:40 pm
by jaison
How to implement a conditional content control using C# ?

Re: Conditional content control in C#

PostPosted: Tue Aug 01, 2017 10:20 am
by jason
Your question is too broad to answer easily, but you do exactly the same thing in docx4j.NET as you do in docx4j itself (ie author your template using OpenDoPE Word Add-In, then do run-time processing using docx4j/docx4j.NET).

Re: Conditional content control in C#

PostPosted: Mon Aug 07, 2017 6:47 pm
by jaison
Thanks Jason.
I created a template file with condition and xpath xml's dynamically created using c#. While processing the created doc file with docx4j returns error as "Couldn't find CustomXmlDataStoragePart! exiting". Please help me to find a solution for the above.


thanks,
jaison.

Re: Conditional content control in C#

PostPosted: Tue Aug 08, 2017 9:22 pm
by jason
Usually you'd use an OpenDoPE Word AddIn to create a template with the correct structure, then at run time pass in an XML file. Docx4j will then replace the relevant custom xml part with that xml file.

To understand what you have done wrong, I'd need to see the template file.

Re: Conditional content control in C#

PostPosted: Wed Aug 16, 2017 5:26 pm
by ramrony
What about StoreItemID in conditional content control. How to get the StoreItemID?