?
Solved

VB6 Syntax - Printout in landscape mode

Posted on 2008-10-02
2
Medium Priority
?
253 Views
Last Modified: 2010-04-21
Hi Experts

Just a quick syntax help on code i've adapted from PAQ (re landscape mode) . OrientStructure gives me  - "user defined type not defined"

Dim q As Integer
Dim Orient As OrientStructure
Const PORTRAIT = 1
Const LANDSCAPE = 2
Const GETSETPAPERORIENT = 30

    ''* Start the printer
    Printer.Print ""
    '* Specify the orientation
    Orient.Orientation = LANDSCAPE
   '*Printout contents of listbox
    For q = 0 To PATPrintLog.ListCount
       
            Printer.Print PATPrintLog.List(q)
            Orient.Orientation = LANDSCAPE
    Next q
       
    Printer.EndDoc
0
Comment
Question by:peterdarazs
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 15

Accepted Solution

by:
ChloesDad earned 1000 total points
ID: 22631766
Hi,

you should be able to do

    Printer.Orientation = vbPRORLandscape

' use vbPRORPortrait to set it as protrait
0
 

Author Closing Comment

by:peterdarazs
ID: 31502651
Thanks ChloesDad - Much appreciated and hope you have a good day there.

Peter
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses
Course of the Month13 days, 4 hours left to enroll

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question