Im trying to print through a macro to a shared printer on a colleagues PC.
I have tried the following but to no avail
Sub Tag()
ActiveCell.Resize(1, 1).Copy Worksheets("Sheet1").Range("A1")
ActiveCell.Offset(, 1).Resize(1, 1).Copy Worksheets("Sheet1").Range("A2")
'Worksheet("Sheet1").Range("A1:A2").Borders.LineStyle = xlNone
Sheets("Sheet1").Select
Range("A1:A2").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
Selection.Borders(xlEdgeLeft).LineStyle = xlNone
Selection.Borders(xlEdgeTop).LineStyle = xlNone
Selection.Borders(xlEdgeBottom).LineStyle = xlNone
Selection.Borders(xlEdgeRight).LineStyle = xlNone
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
Worksheets("Sheet1").Range("A2").WrapText = True
Worksheets("Sheet1").Range("A2").Font.Size = 44
Worksheets("Sheet1").Range("A2").ShrinkToFit = True
Application.ActivePrinter = "Microsoft XPS Document Writer on XPSPort"
'Worksheets("Sheet1").PrintOut ActivePrinter = "DYMO LabelWriter 450 (Copy2) on JCSP55J"
End Sub
the JCSP55J is the colleagues network name.
any ideas how to solve this please?
Best Answer
You can add the ActivePrinter as an argument to PrintOut.
For example: