Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 140
Default opening a pdf file from excel

Should have asked this with my earlier question re logos on buttons as
thought straightforward.

Please will someone give me the code to open a PDF file from within Excel.
I have a button on a spreadsheet that i wish to use to open a PDF file.

many thanks
--
with kind regards

Spike
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default opening a pdf file from excel

Sub Tester2a()
Shell "C:\Program Files\Adobe\Acrobat 5.0\Reader\AcroRd32.exe" & _
" c:\toc1\amcr37-4.pdf", 1
' the following prints the document
'Application.SendKeys "^p~", False
End Sub


or if you have .pdf associated with acrobat reader:


Private Sub CommandButton1_Click()
Shell "Start.exe ""D:\My Documents\sm569_Jan2001\tute6.pdf"""
' Next line would print the file
'Application.SendKeys "^p~", False
End Sub

--
Regards,
Tom Ogilvy

"Spike" wrote:

Should have asked this with my earlier question re logos on buttons as
thought straightforward.

Please will someone give me the code to open a PDF file from within Excel.
I have a button on a spreadsheet that i wish to use to open a PDF file.

many thanks
--
with kind regards

Spike

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 140
Default opening a pdf file from excel

Many thanks works a treat
--
with kind regards

Spike


"Tom Ogilvy" wrote:

Sub Tester2a()
Shell "C:\Program Files\Adobe\Acrobat 5.0\Reader\AcroRd32.exe" & _
" c:\toc1\amcr37-4.pdf", 1
' the following prints the document
'Application.SendKeys "^p~", False
End Sub


or if you have .pdf associated with acrobat reader:


Private Sub CommandButton1_Click()
Shell "Start.exe ""D:\My Documents\sm569_Jan2001\tute6.pdf"""
' Next line would print the file
'Application.SendKeys "^p~", False
End Sub

--
Regards,
Tom Ogilvy

"Spike" wrote:

Should have asked this with my earlier question re logos on buttons as
thought straightforward.

Please will someone give me the code to open a PDF file from within Excel.
I have a button on a spreadsheet that i wish to use to open a PDF file.

many thanks
--
with kind regards

Spike

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
opening a file in Excel starts application but dose not open file Bob Shelton Excel Discussion (Misc queries) 1 July 2nd 08 07:51 PM
Opening file in Excel 2003 opens multipule instances of same file Ed_B Excel Discussion (Misc queries) 1 June 21st 07 07:10 PM
opening an excel file opens a duplicate file of the same file skm Excel Discussion (Misc queries) 1 December 7th 05 05:52 PM
"Unable to read file" error message when opening a Excel file that contains a PivotTable report. Tim Marsden Charts and Charting in Excel 2 October 15th 05 02:10 PM
Error:Invalid File format,while opening an Excel Template file Saurabh Excel Programming 1 January 17th 05 07:15 AM


All times are GMT +1. The time now is 04:24 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"