Dim psz As New Printing.PaperSize
With psz
.RawKind = Printing.PaperKind.Custom
.Width = 80
.Height = 3276
prDoc.DefaultPageSettings.PaperSize = psz
End With
หรือ
Code (VB.NET)
Dim pkCustomSize1 As New PaperSize("Custom", 80, 3276)
prDoc.PrinterSettings.DefaultPageSettings.PaperSize = pkCustomSize1
prDoc.DefaultPageSettings.PaperSize = pkCustomSize1