如何在语法上添加单词文档中的组合框并通过代码设置所选项目 [英] How to add a combo box in a word document grammatically and set the selected item through code
本文介绍了如何在语法上添加单词文档中的组合框并通过代码设置所选项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好,
我想以编程方式在word文档中添加组合框或下拉列表。之后我想通过代码设置选定的值。我想通过c#来做到这一点。
有些身体可以给我正确的链接。我找不到一个。
先谢谢。
Hello,
I want to add a combo box or a drop down in a word document pro grammatically. Also after that I want to set the selected value through code. I want to do this through c#.
can some body please give me proper link. I wan not able to find one .
Thanks in Advance.
推荐答案
@Praveen Kumar
我从来没有这样做过..所以基本上我是以编程方式打开一个单词doc(使用Interop引用的c#代码)写入一些文本。这是我能够实现的。
但是现在我想添加一个组合框来保存一个值列表并显示一个值。
@Ryan
好的我会试一试,谢谢。
@Praveen Kumar
I have never done this .. so basically I am opening a word doc programmatically(c# code using Interop refernces) writing some text into it. which I am able to achieve.
But now I want to add a combo box to hold a list of values and show one value selected.
@Ryan
Okays I will give it a try, Thanks.
这篇关于如何在语法上添加单词文档中的组合框并通过代码设置所选项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文