如何用VB打开一个任意路径下的文件,比如WORD,EXCEL。最好有完整代码。 10
1个回答
展开全部
Public 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
Function OpenURL(ByVal url As String)
Dim lngReturn As Long
lngReturn = ShellExecute(0, "open", url, "", Mid(URL, 1, InStrRev(url, "\") - 1), 1)
End Function
Function OpenURL(ByVal url As String)
Dim lngReturn As Long
lngReturn = ShellExecute(0, "open", url, "", Mid(URL, 1, InStrRev(url, "\") - 1), 1)
End Function
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询