I use the code below (obtained through a previous question on EE) to open a PDF to a particular page from a Word 2010 VBA macro. In addition to opening to a particular page, I would also like to have another Word 2010 VBA macro that would open a PDF to a particular Named Destination in the PDF. I am unable to figure out how to do this. I presume it involves changing the line below:
into some other call to something like AVDoc.GoToNamedDestinantio
n ("MyNamedDest"), but I am unable to figure it out or find it in the Adobe API documentation. Any help would be appreciated.
Dim mypath As String
Dim pg As Integer
mypath = "c:\Users\Rob\Documents\myPDF.pdf"
pg = 13
Set AcroApp = CreateObject("AcroExch.App")
Set AVDoc = CreateObject("AcroExch.AVDoc")
AVDoc.Open mypath, ""
Set PDDoc = AVDoc.GetPDDoc
AVDoc.GetAVPageView.GoTo pg 'put whatever page you want to go to
'there but keep in mind that page 1 is 0