none
Modify existing word Footers with VBA RRS feed

  • Question

  • I have a Word Document that I need to modify with a vbscript.  Generally, I need to expand every footer to a height of 0.5" from the bottom and then grab two text boxes that exist in every footer and move them to the top of the footer region.  

    I have tried recording, Pause, grab the footer, Record, set the distance from the bottom and Stop.  There is nothing in the recording when I finish these steps.  

    Any suggestions would be appreciated.

    Dave

    Tuesday, November 8, 2011 9:42 PM

Answers

  • Yeah. This is the tricky part of Word. You do a lot of recording believing something would be and you will find a Sub and End Sub:)

    BTW there is a Footers collection in Word  which has some properties like Shapes that can belp you.

    Footers can be accessed through Sections like

    ActiveDocument.Sections(1).Footers(wdHeaderFooterPrimary).Shapes.Count 

    ActiveDocument.Sections(1).Footers(wdHeaderFooterPrimary).Shapes(1).Top

    You need to play around these properties and margins to fulfil your requirement

    Cheers

    Shasur

     

     

     


    http://www.vbadud.blogspot.com http://www.dotnetdud.blogspot.com
    Thursday, November 10, 2011 11:25 AM