当前位置:编程学习 > VB >>

VB直接打开word问题

为什么一运行就崩溃 缺少as, 求好心人帮忙 急急急急
补充:那这句为什么也不行!
答案:使用APi函数吧,Open语句比较繁琐。

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", App.Path & "\homwork.doc", vbNullString, vbNullString, vbNormalFocus
End Sub
 

上一个:VB 问题 高人进 急用
下一个:VB中常用程序有哪些?

CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,