如何在 Excel 中打开 PDF 到某一页面?

如何在 Excel 中打开 PDF 到某一页面?

我想要一个 Excel 2013 的宏代码,单击 Excel 单元格中的按钮即可打开特定页面。我正在使用以下代码,但它工作不连贯。请帮忙提供合适的代码。

Sub q8()
Dim IE As Object, strFile As String, iPageNum As Long
strFile = "C:\Users\Neanderthal\Desktop\Maths Practice\GMAT OG 13_2015.pdf"
iPageNum = 19
Set IE = CreateObject("InternetExplorer.Application")
IE.Navigate strFile & "#Page=" & iPageNum
IE.Visible = True
End Sub

到目前为止,IE 正在打开 PDF 文件,但打开时会聚焦第一页。但我希望显示第 19 页。

我该怎么做?解决方案不一定是宏。无论如何,我都可以在 Excel 中打开包含特定页面的 PDF。

相关内容