将Range转换为FlowDocument并返回 [英] Convert Range to FlowDocument and back

查看:97
本文介绍了将Range转换为FlowDocument并返回的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,


 


我在将Interop.Word.Range转换为FlowDocument时出现问题, FlowDocument到Word.Range。我找到了一些有用的东西,OpenXMLWriter,但它只使用文件。并且只能从FlowDocument转换为Word。


 


目前我使用剪贴板作为中介和RichTextBox。这是一种非常难看的方式。有没有人对如何优雅地做到这一点有任何想法?


 


祝你好运,


Silviu。


http://www.rosoftlab.net/

解决方案

您好Silviu,


您对FlowDocument的意义是什么?你的意思是WPF相关控件中的文档显示?请参阅此MSDN文章:


http://msdn.microsoft.com/en-us/library/aa970909.aspx#flow_document_types


最诚挚的问候,


 


Hello,

 

I am having some problems converting an Interop.Word.Range to a FlowDocument, and a FlowDocument to a Word.Range. I found something helpfull, the OpenXMLWriter, but it uses only files. And does only conversion from FlowDocument to Word.

 

At the moment I am using the Clipboard as an intermediary and a RichTextBox. This is a very ugly way to do this. Does anyone have any ideas on how to do this elegantly?

 

Best regards,

Silviu.


http://www.rosoftlab.net/

解决方案

Hi Silviu,

What do you mean about the FlowDocument? Do you mean the document show in WPF related controls? Please see this MSDN article:

http://msdn.microsoft.com/en-us/library/aa970909.aspx#flow_document_types

Best Regards,

 


这篇关于将Range转换为FlowDocument并返回的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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