积极答复者
WPF 打开和编辑office文档

问题
答案
-
你好,
在WPF中打开Office文件,可以使用DocumentViewer控件,但是必须在本机安装了Microsoft Office软件, 请参阅以下Demo:
#How to view word document in WPF application
http://code.msdn.microsoft.com/office/CSVSTOViewWordInWPF-db347436#Show Word file in WPF
http://www.codeproject.com/Articles/649064/Show-Word-file-in-WPF如果想在Word中插入图片,可以使用InlineShapes.AddPicture方法:
#InlineShapes.AddPicture Method
http://msdn.microsoft.com/en-us/library/microsoft.office.interop.word.inlineshapes.addpicture#insert a picture into a word document using c#?
http://social.msdn.microsoft.com/Forums/vstudio/en-US/5d68fa72-3fd2-49ca-bf4b-dce4c2899839/insert-a-picture-into-a-word-document-using-c?forum=vstoWe are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.- 已标记为答案 Franklin ChenMicrosoft employee, Moderator 2013年11月4日 1:39
-
你好,
可通过三种主要方式将文本插入 Microsoft Office Word 文档:
•在范围中插入文本。
•将范围中的文本替换为新文本。
•使用 Selection 对象的 TypeText 方法可在光标位置或选定内容处插入文本具体请参阅:
#如何:以编程方式在 Word 文档中插入文本
http://msdn.microsoft.com/zh-cn/library/vstudio/6b9478cs.aspx
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.- 已编辑 Franklin ChenMicrosoft employee, Moderator 2013年11月4日 1:27
- 已标记为答案 ariellee_jj 2013年11月4日 1:36
全部回复
-
http://bbs.csdn.net/topics/380167640
找到一个类似的问题,其中连接的几篇参考资料也大致看了一下。
一是用WPF Robbin,这个貌似有点复杂,还需细看,而且我也不需要word风格的界面。
二是用DSO Framer控件,但是这个控件微软现在已不支持,其问题也挺多
三是有一个收费的,不知道好不好用http://www.officeocx.com/
现在看下来,Office文档嵌入别的系统中编辑确实挺复杂,
请问各位版主有什么好的解决方案吗或者思路吗?
先谢谢了!
-
你好,
在WPF中打开Office文件,可以使用DocumentViewer控件,但是必须在本机安装了Microsoft Office软件, 请参阅以下Demo:
#How to view word document in WPF application
http://code.msdn.microsoft.com/office/CSVSTOViewWordInWPF-db347436#Show Word file in WPF
http://www.codeproject.com/Articles/649064/Show-Word-file-in-WPF如果想在Word中插入图片,可以使用InlineShapes.AddPicture方法:
#InlineShapes.AddPicture Method
http://msdn.microsoft.com/en-us/library/microsoft.office.interop.word.inlineshapes.addpicture#insert a picture into a word document using c#?
http://social.msdn.microsoft.com/Forums/vstudio/en-US/5d68fa72-3fd2-49ca-bf4b-dce4c2899839/insert-a-picture-into-a-word-document-using-c?forum=vstoWe are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.- 已标记为答案 Franklin ChenMicrosoft employee, Moderator 2013年11月4日 1:39
-
你好,
可通过三种主要方式将文本插入 Microsoft Office Word 文档:
•在范围中插入文本。
•将范围中的文本替换为新文本。
•使用 Selection 对象的 TypeText 方法可在光标位置或选定内容处插入文本具体请参阅:
#如何:以编程方式在 Word 文档中插入文本
http://msdn.microsoft.com/zh-cn/library/vstudio/6b9478cs.aspx
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.- 已编辑 Franklin ChenMicrosoft employee, Moderator 2013年11月4日 1:27
- 已标记为答案 ariellee_jj 2013年11月4日 1:36