PrintObject




With Printer.Font
.Name = "Arial"
.Size = 11
End With
sText = "What a waste it is to lose one's mind."
Printer.Print sText
'An 'undocumented feature' of VB4's Printer Object requires that each new page be

'initialized before the font can be changed. This code works as expected:

' Start new page

Printer.Print
With Printer
' Set margins as desired

.ScaleMode = vbTwips
.CurrentX = 720
.CurrentY = 720
' Now you can set the font

With .Font
.Name = "Arial"
.Size = 11
End With
End With
sText = "If we don't succeed, we run the risk of failure."
Printer.Print sText
Printer.EndDoc










( printobject.html )- by Paolo Puglisi - Modifica del 17/12/2023