简体   繁体   English

Word COM / OLE / VBA:如何保存到内存中或从内存中加载文档?

[英]Word COM/OLE/VBA: How to save to/load from memory a document?

According to the 'Microsoft Office Word™ 2003 Visual Basic Reference', it seems the Document object can only load a file from disk or save a file to disk. 根据“ Microsoft Office Word™2003 Visual Basic参考”,似乎Document对象只能从磁盘加载文件或将文件保存到磁盘。 Is it possible to save a document to memory or load a document from memory? 是否可以将文档保存到内存或从内存加载文档? Since I need to save the documents to a database instead of to disk files. 由于我需要将文档保存到数据库而不是磁盘文件中。 I use Delphi. 我用的是Delphi。

Thank you in advance. 先感谢您。

Office does support opening a file from internet with the WEBDAV protocol. Office确实支持使用WEBDAV协议从Internet打开文件。 I guess it supports the IPersistMoniker interface. 我猜它支持IPersistMoniker接口。 Check DSOFramer's source code for more information. 查看DSOFramer的源代码以获取更多信息。 Note DSOFramer isn't supported and Office may not support the interfaces used in DSOFramer in the future. 注意不支持DSOFramer,并且Office将来可能不支持DSOFramer中使用的接口。

I'm facing the same requirements for an in-house application. 对于内部应用程序,我面临着相同的要求。 I am currently investigating Aspose.Words and TX Text Controls which have support to load/save Word documents from/into memory. 我目前正在研究Aspose.Words和TX Text Control,它们支持将Word文档从内存中加载/保存到内存中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM