打开Word Doc [英] Opening A Word Doc

查看:61
本文介绍了打开Word Doc的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以帮助我 - 我试图在我的程序中打开一个word文档,只需单击一个命令按钮(不使用对话框)就可以请一些人给我代码,因为我相信它相当简单。

could someone please help me - I am trying to open a word document within my program from just the click of a command button (not using dialog boxes) could some one please give me the code for this as am sure its fairly simple.

推荐答案

您是否尝试过使用Shell命令?
Have you tried using the Shell command?


这可能有效;除了我之外,它似乎对所有人都有效


将对象视为对象


oWord = CreateObject(" Word.Application" ;)

oWord.Visible = True

oWord.Documents.Open(" \ filename.doc")
this may work; it seems to work for everyone except for me


Dim oWord As Object

oWord = CreateObject("Word.Application")
oWord.Visible = True
oWord.Documents.Open("\filename.doc")


no我还没有尝试过shell命令 - 不确定它是如何工作的 - 但是就像上面那段代码一样(还没有尝试过,但是还没有回到结果)是不是只有简单的代码可以完成这项工作?

到目前为止感谢
no I havent tried shell command - not sure how it works - but like that code above (havent tried yet ill get back on the outcome) is there not just simple code that will do the job?
thanks so far


这篇关于打开Word Doc的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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