Printing using macro help. Windows 10

  rybing 10:24 13 Feb 2019

Morning all,

not posted in years. I manage a network of 10 windows 10 pcs that all link to a network printer (sharpe).

I have a macro (code pasted below)

What I need it to do is when the staff click on the macro button i made it automatically sends it to the printer and should print the following:

1 letterheaded copy on good paper (i have an overlay on the printer settings) 2 if it is more than 2 pages to have the second page not on letterhead/good paper. 3 a full copy of the above on non letterheaded good paper.

i.e one letter on letterhead to go out to client and a copy for the file.

For some reason the continuation page on the letterheaded copy is coming out third and it is doing an extra first non letterheaded page.

Can anyone assist?

Sub RBLetterhead() ' ' RBLetterhead Macro ' Print to Letterhead with Copy ' ActiveDocument.Repaginate MyPages = ActiveDocument.BuiltInDocumentProperties(wdPropertyPages) ' MsgBox MyPages

ActivePrinter = "SHARP MX-3110N RBLetterhead"
Application.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

If (MyPages > 1) Then
    ActivePrinter = "SHARP MX-3110N PCL6 LHNO"
Application.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
End If

ActivePrinter = "SHARP MX-3110N PCL6"
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

What is Markdown?

Markdown lets you add more formatting to your post. Simply type in your post and it will display as written.

If you wish to add bold or italic characters, add a hyperlink to another website, a heading or a horizontal line, simply use the relevent icons above the text input field.

A preview of your post will appear in the grey box below. If you make a change and you're not happy, simply press the back arrow icon to undo.

Post a Reply

4500

Elsewhere on IDG sites

EE 5G review: How fast is 5G in the UK?

The Best 404 Page Designs: from delightful illustrations to time-wasting games

Powerbeats Pro review

Que faire si le son de votre Mac ne fonctionne plus ?