0
votes

Since many users may have different PDF editing/reviewing programs, but all users have Acrobat reader because of an IT policy, I want an excel hyperlink to open a PDF url using Acrobat reader.

I have yet to find this, but is there some url prefix alternative to file://... to something like acrobat://... ?

The PDF file is on the local network, not internet.

The reason for wanting Acrobat so I can use PDF open parameters: https://www.adobe.com/content/dam/acom/en/devnet/acrobat/pdfs/pdf_open_parameters.pdf

1
Do you want to open a pdf file with adobe reader from excel from your computer (local drives)?Harun24HR
@harun24hr Yes, a local network driveGisMofx

1 Answers

0
votes

Following sub will open a PDF file from local drive.

Sub OpenPDFbyAdobeReader()
    Dim OpenFile
    OpenFile = Shell("C:\Program Files (x86)\Adobe\Reader 11.0\Reader\AcroRd32.exe E:\TestFolder\TestFile.pdf", vbNormalFocus)
End Sub

You may need to change the path of of adobe acrobat reader where it is installed in your PC. Replace the file path with you network path. I do not test it using network path. But the code is tested in my PC using local drive file path.

Edit:

The following code works for network path.

Sub OpenPDFbyAdobeReader()
    Dim OpenFile
    OpenFile = Shell("C:\Program Files (x86)\Adobe\Reader 11.0\Reader\AcroRd32.exe \\MyDesktop-PC\Share_Folder\Test_File.pdf", vbNormalFocus)
End Sub

\\MyDesktop-PC\Share_Folder\Test_File.pdf is a file located on network path. You have ensure access permission to that file.