Click here to Skip to main content
15,797,984 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello Experts,
I am currently working on office AddIn.

In my active(opening) document i have many contents controls like name, Age, Address, etc.,

In my UI screen am listed all the contents controls(xml tags) in tree list.

Here am selecting the name controls from tree list and formatting some actions (bold,color, etc.,) thru font dialog box, it's working fine, written by c#

My question is

created a conditional formatting form in which the content controls properties are retrieved
for some basic actions like greater, lesser,contains ,starts with i completed my coding.

now i want to extend it to custom condition where an if condition is entered by the user in a rich text box and need to execute it. condition is like

if((<name> = "anand")&&(<age> > 20))
do some formatting;
else if(<name> = "name")
do another formatting;

how to execute the above condition?

the formatting that saved in word embedded xml files
name and Age are tags of content controls

needs a solution ASAP plz

Anand Kumar Devendran
Updated 13-Aug-14 2:57am
ZurdoDev 13-Aug-14 8:07am    
Where are you stuck? I don't follow what you are doing.
Anand Kumar Devendran 14-Aug-14 0:46am    
i am stucked in executing the condition entered by a user and store and retrieving of formatting
needs help as soon as possible

AnandKumar Devendran

1 solution

I am using OpenXML based Docentric Toolkit. It supports conditional content well. You first prepare a template, enter conditional element tag(s) and bind them to your view data model from XML or database.

See this sample[^] for more information.

It is a licensed product, but the amount of time it saves, pays off soon.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900