Open pdf in Adobe Acrobat not Reader

aardvark
Lounger
Posts: 47
Joined: 09 Feb 2010, 11:30
Location: OH USA

Open pdf in Adobe Acrobat not Reader

Post by aardvark »

Hi all,

Is there a way to have MS Access open a .pdf in Adobe Acrobat? My client has this situation but his document opens in Adobe Reader. He's trying to open the .pdf using a hyperlink. As always, any and all suggestions are appreciated.

Bill

User avatar
HansV
Administrator
Posts: 78493
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Open pdf in Adobe Acrobat not Reader

Post by HansV »

If Adobe Reader is set as the default application for .pdf files, a hyperlink to a PDF file will open Reader. To open a PDF file in Adobe Acrobat, you have to do so explicitly, e.g.

Shell """%programfiles%\adobe\acrobat.exe"" ""C:\MyFolder\MyFile.pdf"""

Note the use of double quotes within the string.
Best wishes,
Hans

aardvark
Lounger
Posts: 47
Joined: 09 Feb 2010, 11:30
Location: OH USA

Re: Open pdf in Adobe Acrobat not Reader

Post by aardvark »

Thanks Hans. We'll give it a try.

aardvark
Lounger
Posts: 47
Joined: 09 Feb 2010, 11:30
Location: OH USA

Re: Open pdf in Adobe Acrobat not Reader

Post by aardvark »

I tried the suggestion and received the following message:

Unable to open Shell """%programfiles%\adobe\acrobat.exe"" ""I:/Stewardship/Griggs/Dublin_Road/Scanned_Documents_4440 Dublin.pdf"""

User avatar
HansV
Administrator
Posts: 78493
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Open pdf in Adobe Acrobat not Reader

Post by HansV »

The path to the PDF file should contain backslashes \ instead of forward slashes /.

If that doesn't help, check the path where Adobe Acrobat is installed, and modify the path %programfiles%\adobe accordingly.
Best wishes,
Hans

aardvark
Lounger
Posts: 47
Joined: 09 Feb 2010, 11:30
Location: OH USA

Re: Open pdf in Adobe Acrobat not Reader

Post by aardvark »

Tried the path with backslashes \ with the same results. After the message displays, I go to edit the hyperlink and the backslashes \ were changed to forward slashes /.

User avatar
HansV
Administrator
Posts: 78493
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Open pdf in Adobe Acrobat not Reader

Post by HansV »

I'm sorry, I haven't been sufficiently clear. The line that I posted wasn't intended to be entered in the Hyperlink property of a control. It is a VBA line of code to be used in the On Click event of a command button, e.g. if you have a button named cmdOpenPDF:

Code: Select all

Private Sub cmdOpenPDF_Click()
  Shell """%programfiles%\adobe\acrobat.exe"" ""C:\MyFolder\MyFile.pdf"""
End Sub
Best wishes,
Hans

aardvark
Lounger
Posts: 47
Joined: 09 Feb 2010, 11:30
Location: OH USA

Re: Open pdf in Adobe Acrobat not Reader

Post by aardvark »

Thanks Hans. We'll try that tomorrow and let you know.

aardvark
Lounger
Posts: 47
Joined: 09 Feb 2010, 11:30
Location: OH USA

Re: Open pdf in Adobe Acrobat not Reader

Post by aardvark »

What I had to do was reinstall Adobe Acrobat and make it the default for .pdf files. It worked. Thanks much for your assistance.

Bill K

User avatar
HansV
Administrator
Posts: 78493
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Open pdf in Adobe Acrobat not Reader

Post by HansV »

So I presume you can now simply enter the file name (and path) in the Hyperlink property again.
Best wishes,
Hans

aardvark
Lounger
Posts: 47
Joined: 09 Feb 2010, 11:30
Location: OH USA

Re: Open pdf in Adobe Acrobat not Reader

Post by aardvark »

Yes, that is correct.