如何在从word文件复制到C#winform剪贴板时保持文本格式 [英] How to maintain the format of text while copying from word file to C# winform clipboard

查看:469
本文介绍了如何在从word文件复制到C#winform剪贴板时保持文本格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在从word文件复制到C#winform剪贴板时保持文本格式



我尝试过:



用clipboard.gettext()/ clipboard.settext()方法检查

解决方案

你需要捕获所有的Word文档中与文本关联的信息,并保存。请参阅 Clipboard.SetText方法(String,TextDataFormat)(System.Windows.Forms) [ ^ ]。

how to maintain the format of text while copying from word file to C# winform clipboard

What I have tried:

checked with clipboard.gettext()/clipboard.settext() methods

解决方案

You need to capture all the information from the Word document that is associated with the text, and save that also. See Clipboard.SetText Method (String, TextDataFormat) (System.Windows.Forms)[^].


这篇关于如何在从word文件复制到C#winform剪贴板时保持文本格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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