ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Open PDF & RTF files from Excel (https://www.excelbanter.com/excel-programming/279804-open-pdf-rtf-files-excel.html)

Chris

Open PDF & RTF files from Excel
 
I'd like to open PDF and RTF files from Excel. I've tried some codes
but don't work. Followings are my codes which DON'T WORK. Please give
me some advice.

For PDF:
TaskID = Shell("C:\Program Files\Adobe\Acrobat 5.0\Reader
readme.txt,1")

For RTF:

Dim wrdApp As Word.Application
Dim wrdDoc As Word.Document
Set wrdApp = New Word.Application
Set wrdDoc = wrdApp.Documents.Open(FileName)

I need to launch the application and the file. TKS!

Cleber P. de Souza

Open PDF & RTF files from Excel
 
You can to test:
TaskID = Shell("C:\Program Files\Adobe\Acrobat 5.0\Reader\readme.txt", 1)

Cleber

"Chris" escreveu na mensagem
om...
I'd like to open PDF and RTF files from Excel. I've tried some codes
but don't work. Followings are my codes which DON'T WORK. Please give
me some advice.

For PDF:
TaskID = Shell("C:\Program Files\Adobe\Acrobat 5.0\Reader
readme.txt,1")

For RTF:

Dim wrdApp As Word.Application
Dim wrdDoc As Word.Document
Set wrdApp = New Word.Application
Set wrdDoc = wrdApp.Documents.Open(FileName)

I need to launch the application and the file. TKS!




JMMach

Open PDF & RTF files from Excel
 
Perhaps this is simplistic, but how about taking a cell is Excel, then
manually creating a hyperlink to the file, then have the VBA code run that
hyperlink?
--
TTFN
JMMach

"Cleber P. de Souza" wrote in message
...
You can to test:
TaskID = Shell("C:\Program Files\Adobe\Acrobat 5.0\Reader\readme.txt", 1)

Cleber

"Chris" escreveu na mensagem
om...
I'd like to open PDF and RTF files from Excel. I've tried some codes
but don't work. Followings are my codes which DON'T WORK. Please give
me some advice.

For PDF:
TaskID = Shell("C:\Program Files\Adobe\Acrobat 5.0\Reader
readme.txt,1")

For RTF:

Dim wrdApp As Word.Application
Dim wrdDoc As Word.Document
Set wrdApp = New Word.Application
Set wrdDoc = wrdApp.Documents.Open(FileName)

I need to launch the application and the file. TKS!







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

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