..Printer

how do we change the printer layout (potriet,landscape) and paper size from the coding of VB..
please help me..

Comments

  • : how do we change the printer layout (potriet,landscape) and paper size from the coding of VB..
    : please help me..
    :


    To change orientation:

    [code]Printer.Orientation = vbPRORLandScape[/code]

    or

    [code]Printer.Orientation = vbPRORPortrait[/code]

    To change paper size:

    [code]Printer.PaperSize = 9 'A4[/code]

    9 will set the paper size to A4, which is the standard paper size in Australia. The standard in the US I believe is 1 (Letter). To get a list of settings for the Papersize property, look under "PaperSize Property in the MSDN Library.






  • : : how do we change the printer layout (potriet,landscape) and paper size from the coding of VB..
    : : please help me..
    : :
    :
    :
    : To change orientation:
    :
    : [code]Printer.Orientation = vbPRORLandScape[/code]
    :
    : or
    :
    : [code]Printer.Orientation = vbPRORPortrait[/code]
    :
    : To change paper size:
    :
    : [code]Printer.PaperSize = 9 'A4[/code]
    :
    : 9 will set the paper size to A4, which is the standard paper size in Australia. The standard in the US I believe is 1 (Letter). To get a list of settings for the Papersize property, look under "PaperSize Property in the MSDN Library.
    :
    :
    :
    :
    :
    :
    :
    if I use this
    [code]Printer.Orientation = vbPRORLandScape[/code]
    :
    : or
    :
    : [code]Printer.Orientation = vbPRORPortrait[/code]
    :
    : To change paper size:
    :
    : [code]Printer.PaperSize = 9 'A4[/code]

    it donot change the property
    if I use this
    dim P as Printer
    set p= Printers(1)
    P.Orientation = vbPRORLandScape
    ..............................
    then it gives error [Orientation] is read only

    ........
    what is right..


  • : : : how do we change the printer layout (potriet,landscape) and paper size from the coding of VB..
    : : : please help me..
    : : :
    : :
    : :
    : : To change orientation:
    : :
    : : [code]Printer.Orientation = vbPRORLandScape[/code]
    : :
    : : or
    : :
    : : [code]Printer.Orientation = vbPRORPortrait[/code]
    : :
    : : To change paper size:
    : :
    : : [code]Printer.PaperSize = 9 'A4[/code]
    : :
    : : 9 will set the paper size to A4, which is the standard paper size in Australia. The standard in the US I believe is 1 (Letter). To get a list of settings for the Papersize property, look under "PaperSize Property in the MSDN Library.
    : :
    : :
    : :
    : :
    : :
    : :
    : :
    : if I use this
    : [code]Printer.Orientation = vbPRORLandScape[/code]
    : :
    : : or
    : :
    : : [code]Printer.Orientation = vbPRORPortrait[/code]
    : :
    : : To change paper size:
    : :
    : : [code]Printer.PaperSize = 9 'A4[/code]
    :
    : it donot change the property
    : if I use this
    : dim P as Printer
    : set p= Printers(1)
    : P.Orientation = vbPRORLandScape
    : ..............................
    : then it gives error [Orientation] is read only
    :
    : ........
    : what is right..
    :
    :
    :

    I don't know what the problem is there, however try the following:

    [code]Set Printer = Printers(1)
    Printer.Orientation = vbPRORLandscape[/code]

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories