Tooms
06-11-2009, 07:19 AM
Hi guys, hope you can help us.
My firm is running computers with Microsoft XP professionnal SP2 and Office 2007.
I am trying to set up a set of macros to deal with the printing.
Ideally we need 3 macros. one that will print the whole letter only on plain paper (tray 3), one that will print page 1 on headed paper (tray 2) and the rest on plain paper, and one that will, with one button, do a full copy of everything and so it will do both of the above.
We have a HP laserjet attached to the network so everyone is using the same printer.
I keep trying to record a macro but I am not very good.
On the print dialogue box, i have set up under properties, printing shortcuts called "letterhead" and "plain" which if you select them yourself, work perfectly.
But I cannot get a macro to chose them when trying to record one. :dunno
I am not very good with macros so I have no clue where to start to write one from scratch to do this.
This is what I have come up with (very basic I know):
Sub fullprint()
'
' fullprint Macro
'
'
Application.PrintOut FileName:="", Range:=wdPrintAllDocument, Item:= _
wdPrintDocumentContent, Copies:=1, Pages:="", PageType:=wdPrintAllPages, _
ManualDuplexPrint:=False, Collate:=True, Background:=True, PrintToFile:= _
False, PrintZoomColumn:=0, PrintZoomRow:=0, PrintZoomPaperWidth:=0, _
PrintZoomPaperHeight:=0
Application.PrintOut FileName:="", Range:=wdPrintAllDocument, Item:= _
wdPrintDocumentContent, Copies:=1, Pages:="", PageType:=wdPrintAllPages, _
ManualDuplexPrint:=False, Collate:=True, Background:=True, PrintToFile:= _
False, PrintZoomColumn:=0, PrintZoomRow:=0, PrintZoomPaperWidth:=0, _
PrintZoomPaperHeight:=0
End Sub
Sub plainprint()
'
' plainprint Macro
'
'
Application.PrintOut FileName:="", Range:=wdPrintAllDocument, Item:= _
wdPrintDocumentContent, Copies:=1, Pages:="", PageType:=wdPrintAllPages, _
ManualDuplexPrint:=False, Collate:=True, Background:=True, PrintToFile:= _
False, PrintZoomColumn:=0, PrintZoomRow:=0, PrintZoomPaperWidth:=0, _
PrintZoomPaperHeight:=0
End Sub
Sub headedprint()
'
' headedprint Macro
'
'
Application.PrintOut FileName:="", Range:=wdPrintAllDocument, Item:= _
wdPrintDocumentContent, Copies:=1, Pages:="", PageType:=wdPrintAllPages, _
ManualDuplexPrint:=False, Collate:=True, Background:=True, PrintToFile:= _
False, PrintZoomColumn:=0, PrintZoomRow:=0, PrintZoomPaperWidth:=0, _
PrintZoomPaperHeight:=0
End Sub
If anyone has any ideas, that would be very gratefully recieved.
Thanks
My firm is running computers with Microsoft XP professionnal SP2 and Office 2007.
I am trying to set up a set of macros to deal with the printing.
Ideally we need 3 macros. one that will print the whole letter only on plain paper (tray 3), one that will print page 1 on headed paper (tray 2) and the rest on plain paper, and one that will, with one button, do a full copy of everything and so it will do both of the above.
We have a HP laserjet attached to the network so everyone is using the same printer.
I keep trying to record a macro but I am not very good.
On the print dialogue box, i have set up under properties, printing shortcuts called "letterhead" and "plain" which if you select them yourself, work perfectly.
But I cannot get a macro to chose them when trying to record one. :dunno
I am not very good with macros so I have no clue where to start to write one from scratch to do this.
This is what I have come up with (very basic I know):
Sub fullprint()
'
' fullprint Macro
'
'
Application.PrintOut FileName:="", Range:=wdPrintAllDocument, Item:= _
wdPrintDocumentContent, Copies:=1, Pages:="", PageType:=wdPrintAllPages, _
ManualDuplexPrint:=False, Collate:=True, Background:=True, PrintToFile:= _
False, PrintZoomColumn:=0, PrintZoomRow:=0, PrintZoomPaperWidth:=0, _
PrintZoomPaperHeight:=0
Application.PrintOut FileName:="", Range:=wdPrintAllDocument, Item:= _
wdPrintDocumentContent, Copies:=1, Pages:="", PageType:=wdPrintAllPages, _
ManualDuplexPrint:=False, Collate:=True, Background:=True, PrintToFile:= _
False, PrintZoomColumn:=0, PrintZoomRow:=0, PrintZoomPaperWidth:=0, _
PrintZoomPaperHeight:=0
End Sub
Sub plainprint()
'
' plainprint Macro
'
'
Application.PrintOut FileName:="", Range:=wdPrintAllDocument, Item:= _
wdPrintDocumentContent, Copies:=1, Pages:="", PageType:=wdPrintAllPages, _
ManualDuplexPrint:=False, Collate:=True, Background:=True, PrintToFile:= _
False, PrintZoomColumn:=0, PrintZoomRow:=0, PrintZoomPaperWidth:=0, _
PrintZoomPaperHeight:=0
End Sub
Sub headedprint()
'
' headedprint Macro
'
'
Application.PrintOut FileName:="", Range:=wdPrintAllDocument, Item:= _
wdPrintDocumentContent, Copies:=1, Pages:="", PageType:=wdPrintAllPages, _
ManualDuplexPrint:=False, Collate:=True, Background:=True, PrintToFile:= _
False, PrintZoomColumn:=0, PrintZoomRow:=0, PrintZoomPaperWidth:=0, _
PrintZoomPaperHeight:=0
End Sub
If anyone has any ideas, that would be very gratefully recieved.
Thanks