Microsoft Access printer orientation problem

Posted on 2006-05-08
Last Modified: 2008-01-09
I have an application that prints several different types of reports in Microsoft Access
I am attempting to send the mailing label report to the costar label printer and set the orientation to landscape
I am using the following code:

Dim strDefaultPrinter As String
              strDefaultPrinter = Application.Printer.DeviceName
              Set Application.Printer = Application.Printers("Costar printer")
              Application.Printer.Orientation = acPRORLandscape

It sends the report to the printer, but ignores the orientation.  Please help...


Question by:power1007
    LVL 18

    Accepted Solution

    I'm quite confuse. Seems as a report sent to the costar label printer.

    Anyway, I didn't noticed in the code if the printer object was created before invoke the printer.
    Something like:

    ' Variable for the printer object.
    Dim prt As Printer

    Also, the code reffers to the costar printer as the default printer, but the default could be another one, for instance the one that you use to print full page reports.

    So, probably the code is working properly for the default printer, not for the costar.



    Author Comment

    Yes, I had already instansiated the printer.  The simple solution was to change the properties on the page setup of the report and specify a printer there.  Thanks for the help.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Suggested Solutions

    Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
    This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
    In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    779 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

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now