Viewing PDF inside form

Hi,

Is it possible to view a pdf inside a access form?

I have Adobe 9 Pofessional.  I've clicked on the PDF Reader control in the form builder but I get the following error message:

"The OLE server isn't registered"

Is this even possible?

Thanks.
andyw27Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Rey Obrero (Capricorn1)Commented:
why not just refer to the path of the pdf file and open the pdf file with

followhyperlink pathtoPDFFile

or use the Shell command
0
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
What version of Access are you using? While the activex control for PDFs isn't certified as Access-compatible by Adobe, many have reported using it with good success, but I've not yet heard of anyone using it in 2007 or higher (although there may be some who do).

You can always use a 3rd party control, assuming you can find one suitable for your environment and needs. There are dozens upon dozens of them.
0
andyw27Author Commented:
I'm using 2003
0
IT Pros Agree: AI and Machine Learning Key

We’d all like to think our company’s data is well protected, but when you ask IT professionals they admit the data probably is not as safe as it could be.

JezWaltersCommented:
For what it's worth I'm using Access 2007 and Adobe Reader version 9.3.2, and I get the same behaviour.
0
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
Another method is use the WebBrowser control on a form to show your PDF. You can just set the .Navigate property of the control to the path to your PDF file:

Me.YourWebBrowserControl.Navigate "Full path to your PDF file"
0
andyw27Author Commented:
Thanks.

I've tried the browser way but it always open within the Reader and not within the control.

I'm now trying to open the file as per the Shell command.  Having some luck when I hard code the path, but will not work when I try to use a variable, probably just a syntax error but I cannot fix it.

Shell "C:\Program Files\Adobe\Reader 9.0\Reader\AcroRd32.exe '" & rsPath.Fields(0) & "'", vbNormalFocus

Also is it possible to open the PDF as read only, maybe via some command switches?
0
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
Shell "C:\Program Files\Adobe\Reader 9.0\Reader\AcroRd32.exe " & Chr(34) & rsPath.Fields(0) & Chr(34), vbNormalFocus

Here's a PDF that shows the opening parameters availabe with AcroRd32.exe:
http://partners.adobe.com/public/developer/en/acrobat/PDFOpenParameters.pdf#page=5
0
andyw27Author Commented:
Thank you that string works.

How can I further enhance it by using the pararmeters:

I've tried a few ways:

Shell "C:\Program Files\Adobe\Reader 9.0\Reader\AcroRd32.exe " & Chr(34) & rsPath.Fields(0) & "#view=Fit" & Chr(34), vbNormalFocus

But I think my syntax is wrong again.
0
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
You need to enclose the Path in quote, but not the command line params:

Shell "C:\Program Files\Adobe\Reader 9.0\Reader\AcroRd32.exe " & Chr(34) & rsPath.Fields(0) & Chr(34) &  "#view=Fit", vbNormalFocus

So that you're clear, Chr(34) = "
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
JezWaltersCommented:
It's a bad idea to reference fields by their ordinal number - you should use their names instead (i.e. replace "rsPath.Fields(0)" with "rsPath!YourField", where YourField is the appropriate name).
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.