ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   acrobat document in excel (https://www.excelbanter.com/excel-programming/360368-acrobat-document-excel.html)

Marvin

acrobat document in excel
 
I want to open an acrobat document using excel macros or VB. I am using excel
2003

XP

acrobat document in excel
 
Marvin,

The following function should work, correct as necessary for line wrapping -
place both functions below in a standard code module, then call this one with
the following one - see example below:

Function FileOpenNonXLS(argSourceProgramFullName As String,
argSourceDocumentFullName As String)
'OPEN ANOTHER EXECUTABLE PROGRAM AND THEN OPEN A DESIRED FILE IN THE FOREIGN
APP;
Dim strAppFileToOpen As String
Dim lngReturnValue As Long
strAppFileToOpen = argSourceProgramFullName & " " & argSourceDocumentFullName
lngReturnValue = Shell(strAppFileToOpen, vbNormalFocus)
End Function

Example to call the above function, but first modify for your path and
version of Acrobat and a path to a test file, then run the following:

Private Sub Open_Adobe_Acrobat_Application_And_File()
'LAUNCH ADOBE ACROBAT AND OPEN A FILE
Dim strAdobeAppPath As String
Dim strAdobeFullName As String
strAdobeAppPath = "C:\Program Files\Adobe\Acrobat 6.0\Acrobat\Acrobat.exe"
strAdobeFullName = "c:\myDocuments\jblow\TestFile.pdf"
Call FileOpenNonXLS(strAdobeAppPath, strAdobeFullName)
End Sub

HTH

"Marvin" wrote:

I want to open an acrobat document using excel macros or VB. I am using excel
2003



All times are GMT +1. The time now is 10:21 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com