Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Control Point of Sale (POS) printer in VBA (Excel)

Status
Not open for further replies.

PedroMB

Technical User
Aug 8, 2003
7
PT
Hi all,

Sorry about the english...

I like to know if I can't control printing in Excel(VBA) to a Point of Sale (POS) printer.
I like to make small tickets to control expenses, and I don't like to spend A4 paper.
Can I control automatic cut our page ending in VBA ?

Thanks for the help !
 
you can set your print properties by adding a toolbar button that calls a sub, sub having this code:

Code:
With ActiveSheet.PageSetup
    .PrintTitleRows = ""
    .PrintTitleColumns = ""
End With

ActiveSheet.PageSetup.PrintArea = ""
With ActiveSheet.PageSetup
        .LeftHeader = ""
        .CenterHeader = ""
        .RightHeader = ""
        .LeftFooter = ""
        .CenterFooter = ""
        .RightFooter = ""
        .LeftMargin = Application.InchesToPoints(0.75)
        .RightMargin = Application.InchesToPoints(0.75)
        .TopMargin = Application.InchesToPoints(1)
        .BottomMargin = Application.InchesToPoints(1)
        .HeaderMargin = Application.InchesToPoints(0.5)
        .FooterMargin = Application.InchesToPoints(0.5)
        .PrintHeadings = False
        .PrintGridlines = False
        .PrintComments = xlPrintNoComments
        .PrintQuality = 600
        .CenterHorizontally = False
        .CenterVertically = False
        .Orientation = xlPortrait
        .Draft = False
        .PaperSize = xlPaperA4
        .FirstPageNumber = xlAutomatic
        .Order = xlDownThenOver
        .BlackAndWhite = False
        .Zoom = 100
End With
 
Hello johndweidauer!

Yes, I can put this code, but it's is the normal code for printing in VBA Excel. I need to know if I can control special controls like the cutting device or end of paper directly from PrintOut of VBA.

I am think to by a POS printer, but I like to know is this work.

Thanks for your attention,

:)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top