[英]Why does explorer.exe open pdf files with Internet Explorer while Adobe Acrobat is registered?
为什么在注册 Adobe Acrobat 以打开 pdf 文件时,Explorer.exe 使用 Internet Explorer 打开 pdf?
这是代码行:
Shell "Explorer.exe /n," & Chr(34) & strPathWithFileName & Chr(34), vbNormalFocus
除了专门为pdf设置应用程序之外,还有其他解决方案吗?
我使用 Windows XP 和 Excel 2007。
试试下面的 sub 用 Adobe 阅读器打开 PDF 文件。 您必须更正 adobe reader 和Windows XP
的文件路径。 查看 adobe reader 的确切位置,然后使用该路径。
Sub OpenPDF()
Dim AdobeReader As String
Dim MyFile As String
AdobeReader = "C:\Program Files (x86)\Adobe\Acrobat Reader DC\Reader\AcroRd32.exe"
MyFile = "C:\Users\Administrator\Desktop\PI_Adhesive_Sticker_SMI.pdf"
Shell AdobeReader & " " & MyFile, vbNormalFocus
End Sub
这有效:
ActiveWorkbook.FollowHyperlink strPathWithFileName
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.