如何将Interop.Word.Document对象转换为流或字节数组? [英] How to convert an Interop.Word.Document object to a stream or byte array?

查看:626
本文介绍了如何将Interop.Word.Document对象转换为流或字节数组?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图上传我已经在内存中创建到SharePoint 2010中的Word文档,它看起来像要做到这一点的唯一方法是将其转换为字节数组或流。有反正我可以做到这一点的首先保存到磁盘?

I'm trying to upload a word document I have created in memory to Sharepoint 2010 and it looks like the only way to do this is to convert it to a byte array or a stream. Is there anyway I can do this without saving it to disk first?

推荐答案

此链接:<一href="http://social.msdn.microsoft.com/forums/en-US/vsto/thread/84f1ac3f-f078-4087-a627-351d6bb57173/" rel="nofollow">http://social.msdn.microsoft.com/forums/en-US/vsto/thread/84f1ac3f-f078-4087-a627-351d6bb57173/

建议,正确的做法是为

  • 将文档复制到剪贴板,然后流数据从剪贴板,或者...
  • 阅读文档范围的XML。

这篇关于如何将Interop.Word.Document对象转换为流或字节数组?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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