Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 358
Default Opening a PDF file

Hi,

Can someone please assist with a way of opening an Adobe Acrobat Reader PDF
file. If Adobe isn't open do I need to I need to 'shell' to it first?
--
Andrew
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Opening a PDF file


Hi! Maybe this can help...

Function OpenPDFFile(PDFFile As String) As Double
OpenPDFFile = Shell("C:\Program Files\Adobe\Acroba
6.0\Reader\AcroRd32.exe " & PDFFile, vbNormalFocus)
End Function

You should change "C:\Program Files\Adobe\Acroba
6.0\Reader\AcroRd32.exe " to your appropriate adobe install path. *Min
the SPACE after the application name (AcroRd32.exe<SPACE_HERE).*

;)

Andrew Wrote:
Hi,

Can someone please assist with a way of opening an Adobe Acrobat Reade
PDF
file. If Adobe isn't open do I need to I need to 'shell' to it first?
--
Andre


--
T-®e
-----------------------------------------------------------------------
T-®ex's Profile: http://www.excelforum.com/member.php...fo&userid=2657
View this thread: http://www.excelforum.com/showthread.php?threadid=39881

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 358
Default Opening a PDF file

Hi T-Rex,

Thanks but still not too sure how to run the Function - I normally just use
subroutines. Can this be adapted? I have put in my path but where in this
functiion do I insert my filename? Thanks in advance.

--
Andrew


"T-®ex" wrote:


Hi! Maybe this can help...

Function OpenPDFFile(PDFFile As String) As Double
OpenPDFFile = Shell("C:\Program Files\Adobe\Acrobat
6.0\Reader\AcroRd32.exe " & PDFFile, vbNormalFocus)
End Function

You should change "C:\Program Files\Adobe\Acrobat
6.0\Reader\AcroRd32.exe " to your appropriate adobe install path. *Mind
the SPACE after the application name (AcroRd32.exe<SPACE_HERE).*

;)

Andrew Wrote:
Hi,

Can someone please assist with a way of opening an Adobe Acrobat Reader
PDF
file. If Adobe isn't open do I need to I need to 'shell' to it first?
--
Andrew



--
T-®ex
------------------------------------------------------------------------
T-®ex's Profile: http://www.excelforum.com/member.php...o&userid=26572
View this thread: http://www.excelforum.com/showthread...hreadid=398810


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Opening a PDF file


Hi! Yes, you can change it to a sub. I made it a function so it'd be
more generalized and can be used in other situation. anywayz... the
return code isn't really important. it returns the task ID if open is
successful, 0 if unsuccessful. in the function, you pass your pdf file
as the argument.
to test it, you can create a subroutine that uses this:

sub TestOpen()
if OpenPDFFile("C:\MyPDF.pdf") 0 then
msgbox "successful!"
else
msgbox "uh... oh..."
end if
end sub

hope i was able to help... :)

Andrew Wrote:
Hi T-Rex,

Thanks but still not too sure how to run the Function - I normally just
use
subroutines. Can this be adapted? I have put in my path but where in
this
functiion do I insert my filename? Thanks in advance.

--
Andrew


"T-®ex" wrote:


Hi! Maybe this can help...

Function OpenPDFFile(PDFFile As String) As Double
OpenPDFFile = Shell("C:\Program Files\Adobe\Acrobat
6.0\Reader\AcroRd32.exe " & PDFFile, vbNormalFocus)
End Function

You should change "C:\Program Files\Adobe\Acrobat
6.0\Reader\AcroRd32.exe " to your appropriate adobe install path.

*Mind
the SPACE after the application name (AcroRd32.exe<SPACE_HERE).*

;)

Andrew Wrote:
Hi,

Can someone please assist with a way of opening an Adobe Acrobat

Reader
PDF
file. If Adobe isn't open do I need to I need to 'shell' to it

first?
--
Andrew



--
T-®ex

------------------------------------------------------------------------
T-®ex's Profile:

http://www.excelforum.com/member.php...o&userid=26572
View this thread:

http://www.excelforum.com/showthread...hreadid=398810




--
T-®ex
------------------------------------------------------------------------
T-®ex's Profile: http://www.excelforum.com/member.php...o&userid=26572
View this thread: http://www.excelforum.com/showthread...hreadid=398810

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 923
Default Opening a PDF file

Hi,
How about if the path or version of Acrobat is unknown - Is there a method
to open the PDF?

I have a number of remote users and cannot guarantee that the Acrobat reader
is up to date or installed, and if it is in the same place! Worst of
everything I think. I want to provide a help file in PDF format that from
Excel than can open directly.

--
Cheers
Nigel



"T-®ex" wrote in message
...

Hi! Yes, you can change it to a sub. I made it a function so it'd be
more generalized and can be used in other situation. anywayz... the
return code isn't really important. it returns the task ID if open is
successful, 0 if unsuccessful. in the function, you pass your pdf file
as the argument.
to test it, you can create a subroutine that uses this:

sub TestOpen()
if OpenPDFFile("C:\MyPDF.pdf") 0 then
msgbox "successful!"
else
msgbox "uh... oh..."
end if
end sub

hope i was able to help... :)

Andrew Wrote:
Hi T-Rex,

Thanks but still not too sure how to run the Function - I normally just
use
subroutines. Can this be adapted? I have put in my path but where in
this
functiion do I insert my filename? Thanks in advance.

--
Andrew


"T-®ex" wrote:


Hi! Maybe this can help...

Function OpenPDFFile(PDFFile As String) As Double
OpenPDFFile = Shell("C:\Program Files\Adobe\Acrobat
6.0\Reader\AcroRd32.exe " & PDFFile, vbNormalFocus)
End Function

You should change "C:\Program Files\Adobe\Acrobat
6.0\Reader\AcroRd32.exe " to your appropriate adobe install path.

*Mind
the SPACE after the application name (AcroRd32.exe<SPACE_HERE).*

;)

Andrew Wrote:
Hi,

Can someone please assist with a way of opening an Adobe Acrobat

Reader
PDF
file. If Adobe isn't open do I need to I need to 'shell' to it

first?
--
Andrew


--
T-®ex

------------------------------------------------------------------------
T-®ex's Profile:

http://www.excelforum.com/member.php...o&userid=26572
View this thread:

http://www.excelforum.com/showthread...hreadid=398810




--
T-®ex
------------------------------------------------------------------------
T-®ex's Profile:

http://www.excelforum.com/member.php...o&userid=26572
View this thread: http://www.excelforum.com/showthread...hreadid=398810





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Opening a PDF file


sorry, can't help you with that...
well... there's is a GetSetting function in VBA... maybe you can us
this to query the registry (windows) to get the file path and name o
acrobat... you can read about this in the help file....

Nigel Wrote:
Hi,
How about if the path or version of Acrobat is unknown - Is there
method
to open the PDF?

I have a number of remote users and cannot guarantee that the Acroba
reader
is up to date or installed, and if it is in the same place! Worst of
everything I think. I want to provide a help file in PDF format tha
from
Excel than can open directly.

--
Cheers
Nigel



"T-®ex" wrote i
message
...

Hi! Yes, you can change it to a sub. I made it a function so it'd be
more generalized and can be used in other situation. anywayz... the
return code isn't really important. it returns the task ID if ope

is
successful, 0 if unsuccessful. in the function, you pass your pd

file
as the argument.
to test it, you can create a subroutine that uses this:

sub TestOpen()
if OpenPDFFile("C:\MyPDF.pdf") 0 then
msgbox "successful!"
else
msgbox "uh... oh..."
end if
end sub

hope i was able to help... :)

Andrew Wrote:
Hi T-Rex,

Thanks but still not too sure how to run the Function - I normall

just
use
subroutines. Can this be adapted? I have put in my path but wher

in
this
functiion do I insert my filename? Thanks in advance.

--
Andrew


"T-®ex" wrote:


Hi! Maybe this can help...

Function OpenPDFFile(PDFFile As String) As Double
OpenPDFFile = Shell("C:\Program Files\Adobe\Acrobat
6.0\Reader\AcroRd32.exe " & PDFFile, vbNormalFocus)
End Function

You should change "C:\Program Files\Adobe\Acrobat
6.0\Reader\AcroRd32.exe " to your appropriate adobe instal

path.
*Mind
the SPACE after the application nam

(AcroRd32.exe<SPACE_HERE).*

;)

Andrew Wrote:
Hi,

Can someone please assist with a way of opening an Adob

Acrobat
Reader
PDF
file. If Adobe isn't open do I need to I need to 'shell' t

it
first?
--
Andrew


--
T-®ex


------------------------------------------------------------------------
T-®ex's Profile:
http://www.excelforum.com/member.php...o&userid=26572
View this thread:
http://www.excelforum.com/showthread...hreadid=398810




--
T-®ex


------------------------------------------------------------------------
T-®ex's Profile:

http://www.excelforum.com/member.php...o&userid=26572
View this thread

http://www.excelforum.com/showthread...hreadid=398810


--
T-®e
-----------------------------------------------------------------------
T-®ex's Profile: http://www.excelforum.com/member.php...fo&userid=2657
View this thread: http://www.excelforum.com/showthread.php?threadid=39881

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
File:1 and File:2 -- Double Files when Opening One File dallin Excel Discussion (Misc queries) 1 January 25th 07 02:53 AM
opening an excel file opens a duplicate file of the same file skm Excel Discussion (Misc queries) 1 December 7th 05 05:52 PM


All times are GMT +1. The time now is 11:52 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"