Change page orientation using VBA

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Does anyone know how to change the orientation of a document i.e from Portrait to landscape using VBA?

I am trying to write a script that automatically changes a documents formatting including its orientation. Any help will be most gratefully received.
 
Try this:

Sub ChangeOrientation()
With ActiveDocument.PageSetup
.Orientation = wdOrientLandscape
End With
End Sub


--
Bill Foley, Microsoft MVP (PowerPoint)
Microsoft Office Specialist Master Instructor - XP
www.pttinc.com
Check out PPT FAQs at: http://www.rdpslides.com/pptfaq/


Sauron said:
Does anyone know how to change the orientation of a document i.e from
Portrait to landscape using VBA?
I am trying to write a script that automatically changes a documents
formatting including its orientation. Any help will be most gratefully
received.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top