Just a note to say hello. I'm Jim from Western NY.
I have a question and I'm not sure which forum to post it in and I don't want to break any protocol, so if you can tell me where to post it, I'll comply --
Here's my question:
I am wanting to develop a macro for excel which will read
(from a worksheet) a list of hyperlinks to pdf, .doc, and .xls files and
print them using the appropriate application (acrobat, word, excel).
Theoretically, I know I would
have to use some kind of for-next and/or case structure but I don't know how
to implement it. Someone has helped me get started, but the code I have (predictably) only works for Word documents:
'Must set a reference (Tools | References) to:
' Microsoft Word 11.0 Object Library
'11.0 = 2003, 10.0 = 2002 (XP), 9.0 = 2000, etc.
Dim WDApp As Word.Application, WDDoc As Word.Document
Dim c As Range, rngFiles As Range
Set rngFiles = Range("A2", Cells(Rows.Count, "A").End(xlUp))
Set WDApp = New Word.Application
WDApp.Visible = True
For Each c In rngFiles
Set WDDoc = WDApp.Documents.Open(c.Value)
Set WDDoc = Nothing
Set WDApp = Nothing
And here is a sample of the file list, which will change in contents and
number of elements:
C:\Project Books\Templates\Clearance Sheets\BrgThrust&JournalClr.doc
C:\Project Books\Templates\Clearance Sheets\BrgThrust.doc
C:\Project Books\Templates\Clearance Sheets\BrgThrustPadInsp.pdf
C:\Project Books\Templates\Clearance Sheets\RotorAxialPosition.xls
C:\Project Books\Templates\Clearance Sheets\RotorAxPosThrustClr.doc
I initially was going to post in the acrobat automation with vba forum, but there are multiple issues at play here. Where should I post?