Solved

VB6 Syntax - Printout in landscape mode

Posted on 2008-10-02
2
239 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
2 Comments
 
LVL 15

Accepted Solution

by:
ChloesDad earned 250 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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
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…

772 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