Results 1 to 2 of 2

Thread: Printing

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2000
    Posts
    7

    Question

    Within VB I am using Excel. On my VB form I have a chart created with MSChart, it has been populated. Because I can't find a print method in MSchart I cannot find a way of printing it. So I am copying the chart in to the buffer then creating a Excel object and pasting it into Excel.
    I then print the chart from Excel, all this is done in code.
    The problem is it prints out in portrait format. I cannot seem to set it to print in landscape.
    Do I need to make a system call to set the printer to print in landscape, if so How do u do it?

  2. #2
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>...this should do the trick for you

    Code:
    Private Sub Command1_Click()
    
    'These constants are listed in the Visual Basic
    '(VB)object library in theObject Browser.
    'must be set before any print statements
    
    
    'landscape
        Printer.Orientation = vbPRORLandscape
        
    'portrait
        'Printer.Orientation = vbPRORPortrait
        
     
        Printer.Print "Would you look at this!"
        Printer.EndDoc
    
    End Sub
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width