Looping pages in Word Document RRS feed

  • Question

  • Hi,

    I have a requirement to loop through each pages in the word document and increase height of the page in Word Setup and change the tray setting for each page in the word document.

    Can some one help me with the VBA code to do this.



    Krishna Prakash

    Friday, July 13, 2012 5:05 PM


  • Page setup is a feature of the sections in a document, not of the individual pages.

    I'd record a macro and make sure that you select "Whole document" in the "Apply to" dropdown in the Page Setup dialog.

    That will give you a good idea of the VBA code, even if the macro recorder includes more than you really need.

    Regards, Hans Vogelaar

    Friday, July 13, 2012 7:39 PM