How to Change PowerPoint Print Orientation Using VBA
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 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.
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.
Press Alt + F11 on your keyboard to launch the Visual Basic for Applications (VBA) editor in PowerPoint.
Click 'Insert' in the top menu bar and select 'Module' to create a blank script window for your macro.
Type the code: `ActivePresentation.PageSetup.NotesOrientation = msoOrientationHorizontal` to set the print format to landscape, or substitute `msoOrientationVertical` for portrait.
Press F5 or click the 'Run' button on the toolbar to apply the new orientation to your current presentation's print setup.

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. Install WPS Office: Download and install WPS Office, ensuring you are using a version that includes VBA support.
- 2. Open Your Presentation: Launch WPS Presentation and open your .pptm or .pptx presentation file.
- 3. Access the Developer Tools: Navigate to the 'Developer' tab on the top ribbon and click 'Macros' to manage your scripts.
- 4. Run Your Print Macro: Select your orientation adjustment macro from the list and click 'Run' to apply the print settings instantly.

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.




