如何在Winform中刷新和打开VSTO Word文档? [英] How To Refrence and Open VSTO word document in Winform?

查看:503
本文介绍了如何在Winform中刷新和打开VSTO Word文档?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个winform应用程序,旁边还有一个VSTO项目.如何打开Winform项目中嵌入的Word文档?谢谢.如果您能回答这个问题,将不胜感激.

I have a winform application and beside it i have a VSTO Project. How can i open the word document embedded in the winform project? Thanks. I would be thankful if you could answer the question.

推荐答案

使用这样的代码
Use code like this
app = CreateObject("Word.Application")
app.Visible = True
Doc = app.Documents.Add
Doc.Activate
app.Selection.Paste
app.Selection.TypeText


在测试了很多东西之后我发现了一个懒汉.
1)建立vsto专案.
2)将* .docx和* .vsto文件以及dll等文件复制到启动路径.
3)下载axFramerControl OCX并将其添加到Windows窗体中.
4)打开复制到启动路径的.docx文件.

哈米德·诺阿迪(Hamid Noahdi)
I found a sloution after testing many things.
1) Build the vsto project.
2) Copy the files such as *.docx and *.vsto files and the dll to the start up path.
3) Download axFramerControl OCX and add it to the windows form.
4) Open the .docx file which you copied to the startup path.

Hamid Noahdi


这篇关于如何在Winform中刷新和打开VSTO Word文档?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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