|
QQ群网友回复
ACCESS(342366170) 18:19:45
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
'ShellExecute函数二次封装,以简化使用,输入参数File可以是文件名,网页地址或命令行
Public Function ShellEx(File As String)
ShellExecute hWndAccessApp, "Open", File, 0, 0, 1
End Function
ACCESS(342366170) 18:20:50
ShellEx (“文件全名”)
可打开任何文件
ACCESS(342366170) 18:22:42
例: ShellEx (“d:\user\aaa.pdf”)
例: ShellEx (“d:\user\aaa.doc”)
例: ShellEx (“d:\user\aaa.xls”)
例: ShellEx (“d:\user\aaa.jpg”)
tmtony小辣椒(18449932) 18:26:19
@ACCESS
zpy2(1928323988) 18:26:41
tmtony小辣椒(18449932) 18:27:20
Access下也可用
Application.FollowHyperlink “d:\user\aaa.pdf”
|
|