Search code examples
vbams-wordword-2013

Set line spacing of footer in word using VBA


I want to set line spacing of footer of word document to exactly 12 pt.

I used this code

ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageFooter
Selection.ParagraphFormat.LineSpacing = 12

But it doensn't work. I'm using word 2013.


Solution

  • I was able to find a solution by my self.

    This will do the job.

    With Selection.ParagraphFormat
        .LineSpacingRule = wdLineSpaceExactly
        .LineSpacing = 12
    End With