在 ASP 中将网页导出到 Word
我想在网页顶部添加一个按钮,单击该按钮会将整个网页复制到 MS Word 文档中。 这必须在 ASP 中完成。
I would like to add a button on top of a webpage, which when clicked should copy the entire webpage to an MS Word document.
This has to be done in ASP.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
1)首先在服务器上创建一个.doc文件。然后创建一个文件系统对象并用它打开.doc文件并写入:
“htmlOutput”必须包含要导出到word的页面。
2) 另一种选择是直接使用 Word 实例 MSDN 上提到:
您需要深入研究Word API< /a> 以便将内容写入文档。
3) 更改页面的内容类型将自动在 Word 中打开它(如果安装在客户端上):
1) First create a .doc file on the server. Then create a file system object and use it to open the .doc file and write into it:
"htmlOutput" must contain the page you want to export to word.
2) Another option is to directly work with an instance of Word as mentioned on MSDN:
You will need to dig through the Word API in order to write content to the document.
3) Change the content tye of your page will automatically opens it in Word (if installed on the client):