如何用VB打开word2007,例如桌面有个word2007文件,如何用VB打开
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Private Sub Command1_Click()
Open "c:\新建文档.doc" For Output As #1 '打开一WORD文档
Print #1, "这是用VB新建的文档" '
Close
ShellExecute Me.hwnd, "open", "c:\新建文档.doc", vbNullString, vbNullString, 5
End
End Sub
打开word2007 怎么 提示安装CAD 文件
网上查了,有各种所谓的注册表修改的办法,但是发现我的注册表根本不用修改,因为和他们说的要修改的一样,这就尴尬了。后来终于找到方法了,其实就是为了解决VBA开发的公用库问题,安装CAD2007后它将原来office2007中的比较新的公用库文件覆盖成老的库文件了,所以只需要将VBA的几个库文件覆盖成新的文件就可以了。而这几个文件在office2007文件夹就有。
方法:
将下面三个文件覆盖到对应的路径即可:
C:\Program Files (x86)\Office2007\VBE6.DLL
C:\Program Files (x86)\Office2007\VBE6EXT.OLB
C:\Program Files (x86)\Office2007\2052\VBE6INTL.DLL
对应的路径:
C:\Program Files (x86)\Common Files\microsoft shared\VBA\VBA6\VBE6.DLL
C:\Program Files (x86)\Common Files\microsoft shared\VBA\VBA6\VBE6EXT.OLB
C:\Program Files (x86)\Common Files\microsoft shared\VBA\VBA6\2052\VBE6INTL.DLL
vb按钮怎么打开一个word文挡啊求一个vb小程序就是里面有一个 爱问
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long Private Sub Command1_Click() ShellExecute Me.hwnd, "Open", "D:\test.doc", "", App.Path, 1 End Sub。
转载请注明出处51数据库 » word2007要安装vb