Word文档中的标记点
如何在 Word 文档中标记“点”(可以是文本区域或文本字段)?我尝试在文档中放入纯文本内容控件,但是当我查看生成的 XML 时,发现该纯文本控件没有“别名”。我见过的所有获取它的代码都需要它有一个别名。我做错了什么?还有另一种更简单的方法可以轻松地“标记”文档中的某个位置并稍后检索其中的文本吗? (用户将输入文本...)
How can I tag a "spot" (this can be a text area or text field) in a word document? I tried putting a plain text content control in my document, but when I looked at the generated XML there was no "alias" for that plain text control. All the code I've seen for getting one, needs it to have an alias. What am I doing wrong? And is there another easier way to easily "mark" a spot in a document and retrieve the text that's in it later? (The user will be entering the text...)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
通常,您使用书签。您可以标记特定地点,也可以为所选内容(区域)添加书签。它们正是您想要的,并且您会发现它们非常有帮助。
查看 http://openxmldeveloper.org/blog/b /openxmldeveloper/archive/2006/10/09/719.aspx,它应该可以帮助您入门。
文字处理ML
Typically, you use a Bookmark. You can mark a specific spot or you can bookmark a selection (area). They are exactly what you want and you will find them extremely helpful.
Check out http://openxmldeveloper.org/blog/b/openxmldeveloper/archive/2006/10/09/719.aspx, it should get you started.
WordprocessingML
在 Visual Studio 中,我能够使用设计器来设置纯文本控件的属性。在属性上有一个“标签”属性,我将其设置为我想要的标签名称。然后使用这种方法我后来能够找到该控件:
In Visual Studio I was able to use the designer to set the properties of the plain text control. On the properties there is a "tag" property that I set to the name I wanted for my tag. Then using this method I was able to find the control later: