1
我已经创建了一个宏,该宏在预定的程序中打开一个文件(例如用于pdf的Acrobat,用于文档的Word,用于xls的Excel)。但是,某些程序(如Windows照片查看器和Zip文件程序)是一个dll文件。如何修改我的代码以使其适用于非.exe应用程序?VBA打开文件和dll程序
Sub PhotoChart()
Dim strPath As String
Dim strProgram As String
strPath = "C:\Libraries\Photos\WeeklyPlanner.png"
strProgram = "C:\Program Files (x86)\Windows PhotoViewer\PhotoViewer.dll"
Call Shell("""" & strProgram & """ """ & strPath & """", vbNormalFocus)
End Sub
呼叫外壳功能不起作用。计算机发回运行时错误'5':无效的过程调用或参数。