logo
search
VBA & Macro Problems

How to Change PowerPoint Print Orientation Using VBA

Adam DavisAdam Davis Oct 9, 2026 869 views

Question details

The user needs to programmatically switch between portrait and landscape print orientations for PowerPoint notes pages and various print formats using VBA.

Product
PowerPoint
Device & OS
not provided
Scenario
Automating print jobs where different output formats, such as one-slide-per-page versus notes pages, require different print orientations.
Observed behavior
The user needs the printed paper orientation to change automatically via a macro, without altering the presentation's core slide orientation on the screen.
Before you start

Before running or editing macros, ensure the Developer tab is enabled in your ribbon and that your file is saved as a Macro-Enabled Presentation (.pptm) to retain your code.

Solution 1Recommended

Use the PageSetup.NotesOrientation Property in VBA

Modify the NotesOrientation property within the PageSetup object to programmatically control whether notes pages print in landscape or portrait.

PowerPoint VBA provides the PageSetup object to handle document-level configurations, including how pages are output to a printer. The NotesOrientation property specifically dictates the layout of the paper when printing notes pages, handouts, or outlines.

To assign an orientation, you use built-in Office constants: msoOrientationHorizontal for landscape mode, and msoOrientationVertical for portrait mode.

1
Open the VBA Editor

Press Alt + F11 on your keyboard to launch the Visual Basic for Applications (VBA) editor in PowerPoint.

2
Insert a New Module

Click 'Insert' in the top menu bar and select 'Module' to create a blank script window for your macro.

3
Enter the Orientation Code

Type the code: `ActivePresentation.PageSetup.NotesOrientation = msoOrientationHorizontal` to set the print format to landscape, or substitute `msoOrientationVertical` for portrait.

4
Execute the Macro

Press F5 or click the 'Run' button on the toolbar to apply the new orientation to your current presentation's print setup.

Use the PageSetup.NotesOrientation Property in VBA
Slide vs. Page Orientation: This VBA property only changes the orientation of the printed page (e.g., notes or handouts), not the orientation of the actual presentation slides as viewed on your screen.

Automate Presentations Efficiently with WPS Office

WPS Presentation offers robust support for macros and VBA, allowing you to seamlessly execute your existing PowerPoint automation scripts. You can easily adjust print settings and manage layouts within a familiar, highly compatible interface.

  1. 1. Install WPS Office: Download and install WPS Office, ensuring you are using a version that includes VBA support.
  2. 2. Open Your Presentation: Launch WPS Presentation and open your .pptm or .pptx presentation file.
  3. 3. Access the Developer Tools: Navigate to the 'Developer' tab on the top ribbon and click 'Macros' to manage your scripts.
  4. 4. Run Your Print Macro: Select your orientation adjustment macro from the list and click 'Run' to apply the print settings instantly.
Seamless execution of existing PowerPoint VBA macros and automation scripts.High compatibility with Microsoft PowerPoint formats (.pptx, .pptm).Lightweight software with a familiar, easy-to-navigate user interface.Built-in advanced printing options for handouts and notes pages.
microsoft office alternative - wps office

Frequently Asked Questions

Can I have both portrait and landscape slides in the same PowerPoint presentation?

No, PowerPoint requires all slides within a single presentation file to share the same orientation. To mix orientations, you must use hyperlinks to connect two separate presentation files.

Why didn't my print orientation change for individual slides?

The VBA code `PageSetup.NotesOrientation` specifically applies to the layout of printed notes pages, handouts, and outlines, not the slides themselves. To change the actual slide orientation, you must use `PageSetup.SlideOrientation`.

How do I print one slide per page in landscape while keeping notes in portrait?

Because a single presentation cannot hold multiple print orientations simultaneously, you must run separate print jobs. First, use a macro to set the orientation to landscape and print your slides, then change the orientation to portrait via VBA and print your notes pages.