OleContainer - 从 http 打开文档文件?
我需要一些有关 OleContainer 的信息。我在浏览器中嵌入了一个 OleContainer。当我启动该 html 文件时,会打开一个 microsoft word OleContainer,我想显示来自网络的 doc 文件的内容。例如,当我打开html文件时,OleContainer应该查看www.example.com/example.doc的内容,这是其中的doc文件。我希望我清楚地解释了问题。感谢您的任何建议。
I need some info about OleContainer. I embedded an OleContainer in the browser. And when I launch that html file,a microsoft word OleContainer is opened and I want to display content of a doc file from the web. For example, when I open html file, OleContainer should view the content of the www.example.com/example.doc which is a doc file inside of it.I hope I clearly explained the problem. Thx for any advice.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您需要从http服务器(使用套接字或WinInet库)将文件下载到临时目录并使用CreateObjectFromFile方法加载到TOLEContainer
You need download the file from http-server (using sockets or WinInet library) to temporary directory and load to TOLEContainer using CreateObjectFromFile method
您需要 OleContainer 吗?可以使用标准 HTML
这还有一个优点,即它是跨平台的(只要客户端计算机上知道文档类型)。
Do you need a OleContainer? Objects can be embedded in HTML using the standard HTML
<object>
tag. See for exampleThis has also the advantage that it is cross-platform (as long as the document type is known on the client computer).