Internet explorer 如何在internet explorer中打开pdf超链接并转到Excel vba中的特定页面?
我想在internet explorer中打开pdf超链接,然后使用excel VBA转到特定页面Internet explorer 如何在internet explorer中打开pdf超链接并转到Excel vba中的特定页面?,internet-explorer,vba,pdf,Internet Explorer,Vba,Pdf,我想在internet explorer中打开pdf超链接,然后使用excel VBA转到特定页面 有人知道怎么做吗?感谢您的帮助。上面的第一条评论对于链接到特定页面非常有用。下面是使用VBA打开这些链接的两种方法 可以使用FollowHyperlink方法模拟单击链接。链接将在默认浏览器中打开,用户将得到安全提示 Sub OpenPDF_to_page_2_Method_1() Const PDF_PATH = "http://www.adobe.com/support/products/
有人知道怎么做吗?感谢您的帮助。上面的第一条评论对于链接到特定页面非常有用。下面是使用VBA打开这些链接的两种方法 可以使用FollowHyperlink方法模拟单击链接。链接将在默认浏览器中打开,用户将得到安全提示
Sub OpenPDF_to_page_2_Method_1()
Const PDF_PATH = "http://www.adobe.com/support/products/enterprise/knowledgecenter/media/c4611_sample_explain.pdf"
ThisWorkbook.FollowHyperlink PDF_PATH & "#page=2"
End Sub
或者,您可以创建新的Internet Explorer对象并导航到PDF。这将使用Internet Explorer,而不考虑默认浏览器,并且在打开链接之前不会向用户提供安全提示
Sub OpenPDF_to_page_2_Method_2()
Const PDF_PATH = "http://www.adobe.com/support/products/enterprise/knowledgecenter/media/c4611_sample_explain.pdf"
Dim IE As Object
Set IE = CreateObject("InternetExplorer.Application")
IE.Visible = True
IE.Navigate (PDF_PATH & "#page=2")
Set IE = Nothing
End Sub
http://www.example.com/myfile.pdf#page=4