Detr0itkid
Member
I would like to write a very simple macro to print only the first page of an email. It would seem to me that I could just insert something like:
obj.PrintOut From:=1, To:=1, Copies:=1 (Taken From Excell Macro)
OR
obj.PrintOut FileName:="", Range:=wdPrintRangeOfPages, Item:= _
wdPrintDocumentContent, Copies:=1, Pages:="1", PageType:=wdPrintAllPages, _
ManualDuplexPrint:=False, Collate:=True, Background:=True, PrintToFile:= _
False, PrintZoomColumn:=0, PrintZoomRow:=0, PrintZoomPaperWidth:=0, _
PrintZoomPaperHeight:=0 (Taken From Word Macro)
into the OTM macro below, I have tried both with minimal tweaking and have had no success. As it is now possible to do File>Print>Print Range it seems that a macro could be written to preform this function. Assistnace with the proper code would be awesome.
If this is not possible, is there a way to work around this? For example a macro that would make a plain text copy, print one page, then delete the plain text copy. Maybe something that would open it in a browser print one page and then close it. Again, any help would be awesome!
Public Sub PrintMail()
Dim obj As Object
Set obj = Application.ActiveExplorer.Selection(1)
obj.Display
obj.PrintOut
End Sub
obj.PrintOut From:=1, To:=1, Copies:=1 (Taken From Excell Macro)
OR
obj.PrintOut FileName:="", Range:=wdPrintRangeOfPages, Item:= _
wdPrintDocumentContent, Copies:=1, Pages:="1", PageType:=wdPrintAllPages, _
ManualDuplexPrint:=False, Collate:=True, Background:=True, PrintToFile:= _
False, PrintZoomColumn:=0, PrintZoomRow:=0, PrintZoomPaperWidth:=0, _
PrintZoomPaperHeight:=0 (Taken From Word Macro)
into the OTM macro below, I have tried both with minimal tweaking and have had no success. As it is now possible to do File>Print>Print Range it seems that a macro could be written to preform this function. Assistnace with the proper code would be awesome.
If this is not possible, is there a way to work around this? For example a macro that would make a plain text copy, print one page, then delete the plain text copy. Maybe something that would open it in a browser print one page and then close it. Again, any help would be awesome!
Public Sub PrintMail()
Dim obj As Object
Set obj = Application.ActiveExplorer.Selection(1)
obj.Display
obj.PrintOut
End Sub