Sorry for the delay, that work thing.
Here is a starting point. Since there are only six printers and I suspect they change very rarely I went ahead and stored them in the code that way you can store the macro in GENERAL.XLS (I think that's what it's called) and will be available everytime you open Excel or you can save this in the workbook that actually has the schedule.
Code:
Public Sub BroadcastPrint()
'Create a container for the ActiveSheet
Dim wksActive As Worksheet
'Create a 'counter', will use to navigate the Printers() array
Dim intPrinter As Integer
'Create a container for the Printer Names
Dim Printers(5) As String
'Assign the sheet
Set wksActive = ActiveSheet
'Add the printer names (Zero based array)
Printers(0) = "Adobe PDF"
Printers(1) = "GhostscriptPDF"
Printers(2) = "lp"
Printers(3) = "Database Fax"
Printers(4) = "Printer5"
Printers(5) = "Printer6"
'Create a loop that will perform the printing
For intPrinter = 0 To UBound(Printers)
'Perform the PrintOut method leaving the
'From, To, Copies, Preview arguments blank
wksActive.PrintOut , , , , Printers(intPrinter)
Next intPrinter
'Clean up
Set wksActive = Nothing
End Sub
kikboxr777 said:
Keep in mind that my level of understanding macros is limited at best
Ok, now what do you do with this code? It needs to be copied into your workbook, easiest way for non-code people:[ol][li]In your Workbook goto
Tools =>
Macro =>
Record New Macro...[/li][li]In the Record Macro dialog click OK (default macro name should be
Macro1)[/li][li]Type any text into a cell[/li][li]Locate the Macro toolbar and click Stop Recording[/li][li]In your Workbook goto
Tools =>
Macro =>
Macros...[/li][li]Select
Macro1 and click
Edit[/li][/ol]
You should be looking at the Macro Editor and should see something that starts [tt][blue]Public Sub[/blue] Macro1()[/tt] and ends [tt][blue]End Sub[/blue][/tt], copy the above code block and paste it in under the [tt][blue]End Sub[/blue][/tt]. You will need to update the following lines (text in
Bold) to reflect your real printer names (they must be exactly what appears in your Printers folder).[tt]
Printers(0) =
"Adobe PDF"
Printers(1) =
"GhostscriptPDF"
Printers(2) =
"lp"
Printers(3) =
"Database Fax"
Printers(4) =
"Printer5"
Printers(5) =
"Printer6"[/tt]
Now save the workbook and you should be ready to go. To fire the macro you can
Tools =>
Macro =>
Macros..., select [tt]BroadcastPrint[/tt] and click Run, or create a Menu bar that points to this Macro, or...
One last note, if I mispelled the printer name in the code Excel would print it to my default Printer.
Hope this helps,
CMP
Instant programmer, just add coffee.