C
ChadDiesel
I asked the question a couple of years ago about a macro that would
open a spreadsheet based on a file path listed in a certain cell,
print the spreadsheet, close the spreadsheet, and move to the next
cell and keep printing until it hits a blank cell. Here is the
example:
I have a spreadsheet that contains 2 columns-Part Number and Drawing
Location. The sheet looks something like this:
---A------------------------B-------------------------
Part#-----------Drawing Location
Part 1----------c:\drawings\part1.xls
Part 2----------c:\drawings\part2.xls
Part 3----------c:\drawings\part3.xls
When the macro runs, part1.xls opens/prints/closes, part2.xls opens/
prints/closes, part3.xls opens/prints/closes and then it stops.
Don Guillett and Dave Peterson helped me with this last time:
Dim LR As Long
Dim WB As Workbook
Dim WBCell As Range
LR = Cells(Rows.Count, "b").End(xlUp).Row
For Each WBCell In Range("b2:b" & LR)
Set WB = Workbooks.Open(WBCell.Value)
WB.PrintOut
WB.Close SaveChanges:=False
Next WBCell
This has worked great for 2 years. My only problem now is that we are
switching to drawings in PDF format instead of Excel format. We might
even have some drawings in Tiff format but primarily PDF
If the new format is:
---A------------------------B-------------------------
Part#-----------Drawing Location
Part 1----------c:\drawings\part1.pdf
Part 2----------c:\drawings\part2.pdf
Part 3----------c:\drawings\part3.pdf
Can the same thing be done with PDF or Tiff files, since an external
program is needed to open the files?
Any help would be appreciated. Thank You.
-Chad
open a spreadsheet based on a file path listed in a certain cell,
print the spreadsheet, close the spreadsheet, and move to the next
cell and keep printing until it hits a blank cell. Here is the
example:
I have a spreadsheet that contains 2 columns-Part Number and Drawing
Location. The sheet looks something like this:
---A------------------------B-------------------------
Part#-----------Drawing Location
Part 1----------c:\drawings\part1.xls
Part 2----------c:\drawings\part2.xls
Part 3----------c:\drawings\part3.xls
When the macro runs, part1.xls opens/prints/closes, part2.xls opens/
prints/closes, part3.xls opens/prints/closes and then it stops.
Don Guillett and Dave Peterson helped me with this last time:
Dim LR As Long
Dim WB As Workbook
Dim WBCell As Range
LR = Cells(Rows.Count, "b").End(xlUp).Row
For Each WBCell In Range("b2:b" & LR)
Set WB = Workbooks.Open(WBCell.Value)
WB.PrintOut
WB.Close SaveChanges:=False
Next WBCell
This has worked great for 2 years. My only problem now is that we are
switching to drawings in PDF format instead of Excel format. We might
even have some drawings in Tiff format but primarily PDF
If the new format is:
---A------------------------B-------------------------
Part#-----------Drawing Location
Part 1----------c:\drawings\part1.pdf
Part 2----------c:\drawings\part2.pdf
Part 3----------c:\drawings\part3.pdf
Can the same thing be done with PDF or Tiff files, since an external
program is needed to open the files?
Any help would be appreciated. Thank You.
-Chad