Results 1 to 5 of 5

Thread: how to open specific page in pdf
Thanks Thanks: 0 Likes Likes: 0

  1. #1
    Board Regular
    Join Date
    Oct 2017
    Posts
    349
    Post Thanks / Like
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Default how to open specific page in pdf

    iam looking for a formula or vba in excel which will be easy to access to open specific page in pdf

    i have 64 bit adobe Acrobat professional 8

  2. #2
    Board Regular
    Join Date
    Oct 2007
    Posts
    5,837
    Post Thanks / Like
    Mentioned
    8 Post(s)
    Tagged
    2 Thread(s)

    Default Re: how to open specific page in pdf

    Try this, changing the Acrobat.exe (or Adobe Reader) path and PDF file name as required.
    Code:
    Const cAdobeReaderExe As String = "C:\Program Files (x86)\Adobe\Acrobat 11.0\Acrobat\Acrobat.exe"
    
    Public Sub Open_PDF_At_Page()
    
        Dim PDFfile As String
        Dim AdobeCommand As String
        
        PDFfile = "C:\path\to\PDF document.pdf"
        
        AdobeCommand = " /a ""page=2=Open Actions"" "
        
        Shell cAdobeReaderExe & AdobeCommand & Chr(34) & PDFfile & Chr(34), vbNormal
    
    End Sub

  3. #3
    Board Regular
    Join Date
    Oct 2017
    Posts
    349
    Post Thanks / Like
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Default Re: how to open specific page in pdf

    Its Working fine but every time i have to change page number in code

    is it possible to get it by using cell reference or function because lot of page links are there for individual cells?

    i have to give cell reference to each cell
    Ex:
    A1=10

    10th page need to open

  4. #4
    Board Regular
    Join Date
    Oct 2007
    Posts
    5,837
    Post Thanks / Like
    Mentioned
    8 Post(s)
    Tagged
    2 Thread(s)

    Default Re: how to open specific page in pdf

    Code:
        AdobeCommand = " /a ""page=" & ActiveSheet.Range("A1").Value & "=Open Actions"" "

  5. #5
    New Member
    Join Date
    Aug 2019
    Posts
    1
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: how to open specific page in pdf

    Quote Originally Posted by John_w View Post
    Try this, changing the Acrobat.exe (or Adobe Reader) path and PDF file name as required.
    Code:
    Const cAdobeReaderExe As String = "C:\Program Files (x86)\Adobe\Acrobat 11.0\Acrobat\Acrobat.exe"
    
    Public Sub Open_PDF_At_Page()
    
        Dim PDFfile As String
        Dim AdobeCommand As String
        
        PDFfile = "C:\path\to\PDF document.pdf"
        
        AdobeCommand = " /a ""page=2=Open Actions"" "
        
        Shell cAdobeReaderExe & AdobeCommand & Chr(34) & PDFfile & Chr(34), vbNormal
    
    End Sub
    Hi John, I was trying to use this code with my Mac. But its not working there. Any suggestions ?

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •