opening a pdf file from my documents using excel macro

youngsb

New Member
Joined
Sep 21, 2005
Messages
4
i am able to open adobe reader 7 with the code attached but i want to open a certain pdf file from my documents using a macro in excel, can anyone assist with the extra code please.


Shell "C:\Program Files\Adobe\Acrobat 7.0\Reader\AcroRd32.exe ", vbNormalFocus
 

Some videos you may like

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).

bandit_1981

Board Regular
Joined
Aug 17, 2005
Messages
201
Change the PDF Name and the Path and it should work

Private Declare Function ShellExecute Lib _
"shell32.dll" Alias "ShellExecuteA" ( _
ByVal hwnd As Long, ByVal lpOperation As String, _
ByVal lpFile As String, ByVal lpParameters As String, _
ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long

Call ShellExecute(1, "Open", "EN.PDF", vbNullString, "C:", 0)
 

Watch MrExcel Video

Forum statistics

Threads
1,118,910
Messages
5,574,989
Members
412,633
Latest member
simon_elvin
Top