PageSetup.TogglePortrait method (Word)
Switches between portrait and landscape page orientations for a document or section.
Syntax
expression. TogglePortrait
expression Required. A variable that represents a PageSetup object.
Remarks
If the specified sections have different page orientations, an error occurs.
Example
This example changes the page orientation for the active document.
ActiveDocument.PageSetup.TogglePortrait
This example changes the page orientation for all the sections in the selection. If the initial orientation of each section is not the same as the orientation of the other sections, an error occurs.
Selection.PageSetup.TogglePortrait
See also
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for