With VB.Printer
        .PaperSize = 256                   ' 自定义纸张大小
        .Width = CInt(paperWidth) * 56.7   ' 毫米
        .Height = CInt(paperHeight) * 56.7
    End With例子:
Public Sub PrintText(text As String, x As Long, Y As Long, Optional Clr As Long = vbBlack, Optional fontsize As Long = 10)
    ' 在 (X,Y) 点打印 text 文本
    With VB.Printer
        ' 按照毫米方式打印
        .ScaleMode = 6
        .CurrentX = x
        .CurrentY = Y
        .fontsize = fontsize
        .ForeColor = Clr
    End With
    VB.Printer.Print text
    'Form1.Print text
End Sub