如何使用C#在word中添加富文本内容控件 [英] How to add rich text content control in word using C#

查看:390
本文介绍了如何使用C#在word中添加富文本内容控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有word文件。我想在文本中添加富文本内容控件,如公司名称,员工姓名这些字段,它应显示为开始和结束标签



怎么能我用C#做到这一点?我应该能够搜索文本员工姓名并对其进行内容控制,并且富文本内容控件属性显示应该是开始/结束标记而不是Boudning框



谢谢

Vaibhav



我尝试过:



我尝试使用Spire.doc,但无法找到任何东西来查找文本并控制它/

解决方案

我是我没错,你在谈论书签。请参阅: Spire - Tutorials:Bookmark [ ^ ]



引用:



在C#,VB.NET中插入Word书签 [ ^ ]

删除书签在C#,VB.NET [ ^ ]

如何使用HTML代码编辑/替换Word书签的内容 [ ^ ]

如何将DOCX中的书签保存为PDF转换 [ ^ ]

如何在word文档中的书签处插入图像 [ ^ ]

如何设置word文档中不同级别书签的颜色 [ ^ ]

使用C#,VB.NET在书签中获取文本 [ ^ ]

用C#,VB.NET中的Word文档中的表替换书签 [ ^ ]





祝你好运!


Hi, I have word file. i want to add rich text content control around text like "Company Name" , "Employee Name" these field and it should be displayed as start and end tag

How can i do this using C#? i should be able to search text "Employee Name" and put content control around it, and Rich text content control properties show as should be "Start/End tag" instead of Boudning box

Thanks
Vaibhav

What I have tried:

I tried using Spire.doc , but could not get anything to find text and put control around it/

解决方案

I'f i'm not wrong, you are talking about bookmark. See: Spire - Tutorials: Bookmark[^]

Quote:


Insert Word Bookmark in C#, VB.NET[^]
Remove Bookmark in C#, VB.NET[^]
How to Edit/Replace the Content of Word Bookmark with HTML Code[^]
How to preserve bookmarks in DOCX to PDF conversion[^]
How to insert an image at bookmark in word documents[^]
How to set the color for different levels bookmark in word documents[^]
Get Text within a Bookmark in C#, VB.NET[^]
Replace Bookmark with a Table in Word Documents in C#, VB.NET[^]



Good luck!


这篇关于如何使用C#在word中添加富文本内容控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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