![]() |
#1
|
|||
|
|||
![]()
I have created a macro that would print to a specific printer (not default) and current page only. I've created macros in the past without any problems. But when I run this I get a box displayed on the screen titled Microsoft Visual Basic for Application with white X inside a red circle and buttons for OK, Help.
This is the macro: Sub envelope() ' ' envelope Macro ' ' ActivePrinter = "\\JOHNSONHALL\Laser 4" Application.PrintOut FileName:="", Range:=wdPrintCurrentPage, Item:= _ wdPrintDocumentWithMarkup, Copies:=1, Pages:="", PageType:= _ wdPrintAllPages, Collate:=True, Background:=True, PrintToFile:=False, _ PrintZoomColumn:=0, PrintZoomRow:=0, PrintZoomPaperWidth:=0, _ PrintZoomPaperHeight:=0 End Sub I've also tried this macro which 'sort of' worked. This selected the printer on the 2nd try but ignored the Current Page: Sub test() ActiveDocument.PrintOut wdPrintCurrentPage ActivePrinter = "\\JOHNSONHALL\Laser 4" End Sub There is a delay when manually selecting a printer which I suspect is part of the problem (system related). The default printer is Adobe PDF which needs to remain in place for another function. I only need WORD to change printer for hard copies. Any thoughts? Thanks! |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
tbesh | Excel | 1 | 09-07-2015 09:43 AM |
![]() |
mbesspiata | Excel | 1 | 01-17-2015 05:02 AM |
![]() |
bremen22 | Excel Programming | 2 | 01-29-2014 09:07 AM |
Page numberring 1 - blank - 2 - blank etc | Intern | PowerPoint | 0 | 09-02-2011 01:16 AM |
![]() |
sieler | Word | 3 | 04-12-2009 01:38 PM |