有人知道如何在点击特定类型的超链接时提示用户在两个应用程序之间进行选择(以便打开相关文件)吗? 我想这与application.open ..
有关答案 0 :(得分:0)
如果您知道这两个应用程序的路径,则可以执行shell命令
Sub app1_Click()
openInApplication("C:\Path\to\app1", hyperLink)
End Sub
Sub app2_Click()
openInApplication("C:\Path\to\app2", hyperLink)
End Sub
Sub openInApplication(pathToApp as String, hyperLink as String)
If Dir(pathToApp) = "" Then
MsgBox "Path Not Found", vbCritical, "Macro Ending"
Exit Sub
End If
Shell """" & pathToApp & """" & hyperLink
End Sub