Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

linking excel and pdf

Forum home » Delegate support and help forum » Microsoft Excel Training and help » Linking Excel and pdf

Linking Excel and pdf

ResolvedVersion 2003

Christoper has attended:
Excel VBA Intro Intermediate course
Access VBA course
Excel VBA Advanced course

Linking Excel and pdf

Hi,

I have writen some code that generates a pdf from an Excel file and the pdf is saved in a folder. I was wondering if there is some code that would then open the pdf. I was thinking it may be in the "shell" function?

Many thanks

Chris

RE: Linking Excel and pdf

Hi Chris

Thanks for your question

You can use the shell command to open an application programmatically

For example the following line of code opens Word

Shell ("D:\Program Files\Microsoft Office\Office12\winword.exe")


The trick would be to get it to then open a specific file. I can see no arguments in the switch function to specify a particular file. It might be possible using some more general VB6 code. This will require further research on my part.

If I can find a simple solution to the problem, I will follow up this post within the next day or so

Regards

Stephen

Excel tip:

Switching Between Spreadsheets

As the Alt+Tab key switches between loaded applications or files, Ctrl+Tab switches between loaded or open Excel files. Hold down the Ctrl key until you have tabbed to the correct spreadsheet.

View all Excel hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.12 secs.