Excel: Setting up print options with a macro / vba

Posted on 2007-10-04
Last Modified: 2008-01-09
I would like to utilize a macro to setup printing properties, specifically defined selection to print, and a change to landscape.  Can someone point me in the right direction to find this information please?
Question by:Derek_Indianapolis
    LVL 17

    Accepted Solution

    Here is an example of VBA code to have the printer print the selection. Don't know about setting for landscape

        Selection.PrintOut Copies:=1, Collate:=True

    Author Comment

    XlPageOrientation can be one of these XlPageOrientation constants.

    Author Comment

    The last post makes the paper print in landscape, however, it causes the printed page to be extremely small?  Does anyone have anyhelp on this one?

    Author Comment

    Hopefully the point increase will help.

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    Join & Write a Comment

    Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
    Creating and Managing Databases with phpMyAdmin in cPanel.
    The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
    The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…

    754 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

    24 Experts available now in Live!

    Get 1:1 Help Now