Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

VB6 Syntax - Printout in landscape mode

Posted on 2008-10-02
2
Medium Priority
?
260 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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…
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

610 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