Displaying PDF files using VBA in access 2003

ianclegg

Registered User.
Local time
Today, 13:01
Joined
Jul 14, 2001
Messages
58
Can anyone help me with code to open externally saved PDF files from a button on an access formn using VBA.

My pdfs are located in a folder on the c: drive

eg. c:/jobpacks/a/alfreton/yyy.pdf
/b/barnsley/xxx.pdf etc


All I want to do is open them and display them on the screen, I would then like to email them as an attachment.


Thanks in anticipation


Regards


Ian Clegg
 
The displaying of them and the emailing are two different things.

1. You can display simply by using

FollowHyperlink "YourPathAndFileNameHere"

2. For emailing it does depend a little on what client you are using. What email client are you using?
 
Thanks Bob for the prompt reply

The followhyperlink is just what I wanted, I did not know that exsisted.

I can then emil the pdf from within adobe reader to a mail recipient


Regards

Ian
 
The displaying of them and the emailing are two different things.

1. You can display simply by using

FollowHyperlink "YourPathAndFileNameHere"

2. For emailing it does depend a little on what client you are using. What email client are you using?


Wow. Just needed this today. Didn't know about the FollowHyperlink. VERY helpful. thanks Bob!!
 
FollowHyperlink is brilliant, it should let Windows work out what program it would normally use to open that file type so it saves you working out which app to open and how to open the file in that app.

I use it in just about all occasions when I am opening an external file, unless I need the code to continue to control it after opening.
 
FollowHyperlink is brilliant, it should let Windows work out what program it would normally use to open that file type so it saves you working out which app to open and how to open the file in that app.

I use it in just about all occasions when I am opening an external file, unless I need the code to continue to control it after opening.


I was wondering if that was the way it worked. So the file association comes into play. Not a very good name for the function though unless it was intended primairly for different use.
 
Not a very good name for the function though unless it was intended primairly for different use.

Well, it probably was intended for opening website hyperlinks but if you notice even Word, Excel, and such allow you to have hyperlinks to files and if you go to open a file, it opens the associated program by default to display it. So, the follow on for followhyperlink would be that it can open files based on the file association.
 

Users who are viewing this thread

Back
Top Bottom