Word footer macro
Solved
sabreb
-
trole -
trole -
Hello,
I'm looking to create a macro to insert a centered footer and modify the bottom margin of the document.
But when I start recording and open "Header and Footer" I only have access to the header... can someone enlighten me?
Thanks
I'm looking to create a macro to insert a centered footer and modify the bottom margin of the document.
But when I start recording and open "Header and Footer" I only have access to the header... can someone enlighten me?
Thanks
Configuration: Mac OS X Safari 525.27.1 Word from Office 2007
1 answer
-
Hello,
The macro recorder can help, but it won’t give you perfect code, far from it...
Try this by setting your own measurements for the margin and the footer distance, as well as for the text to insert:
Sub pieddepage() With ActiveDocument.PageSetup .BottomMargin = CentimetersToPoints(3) .FooterDistance = CentimetersToPoints(1.5) End With ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageFooter With Selection.HeaderFooter.Range .Text = "montexte" .ParagraphFormat.Alignment = wdAlignParagraphCenter End With ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument End Sub
m@rina
--
No need to ask me questions in PM...
Definitely I won’t respond... The forum is for that.