执行word文档中的条件 [英] execute conditions in word document

查看:90
本文介绍了执行word文档中的条件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello Experts,

我目前正在办公室AddIn。



在我的活动(开放)文档中,我有很多内容控件喜欢名字,年龄,地址等,



在我的UI界面中,我列出了树状列表中的所有内容控件(xml标签)。



这里从树列表中选择名称控件并通过字体对话框格式化一些操作(粗体,颜色等),它工作正常,由c#
$ b编写$ b

我的问题是



创建了一个条件格式化表单,其中检索内容控件属性

对于一些基本的动作,如更大,更小,包含,从我完成我的编码开始。



现在我想将它扩展到自定义条件,其中输入if条件富文本框中的用户需要执行它。条件类似于



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;
}





如何执行上述条件?



保存在word嵌入式xml文件中的格式

名称和年龄是内容控件的标签





需要一个解决方案ASAP PLZ



通过

Anand Kumar Devendran



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

By
Anand Kumar Devendran

推荐答案

我正在使用基于OpenXML的Docentric Toolkit。它很好地支持条件内容。首先准备一个模板,输入条件元素标签并将它们从XML或数据库绑定到您的视图数据模型。



请参见此示例 [ ^ ]了解更多信息。



这是一个许可产品,但它节省的时间很快就会收到回报。
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.


这篇关于执行word文档中的条件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆