本示例先改变文档的方向,再打印该文档。本示例然后将文档的方向恢复为纵向。

Set myDoc = Application.ActiveDocument
With myDoc
    .PageSetup.Orientation = wpsOrientLandscape
    .PrintOut
    .PageSetup.Orientation = wpsOrientPortrait
End With