Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 ms word 中有一个表格,其中包含单元格中的内容控件富文本(可以通过使用开发人员功能区添加)。我想使用 window c# 读取和写入富文本中的文本。
我试图通过 wd.ActiveDocument.FormFields.Count.ToString() 读取字段
您可以使用 office interop api 来探索 word 文件。
查看以下链接,
http://msdn.microsoft.com/en-us/library/dd264733.aspx
非常紧急,细节很少
你不说 Forms 或 WPF
据我所知,在没有第三方控制的情况下,不会在 .NET 中读写 MS Word
FlowDocument 具有丰富的格式,但仅限于 WPF。
RichTextBox 可用于编辑 FlowDocument。
流文档