Word footer macro

Solved
sabreb -  
 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
Configuration: Mac OS X Safari 525.27.1 Word from Office 2007

1 answer

  1. m@rina Posted messages 27523 Registration date   Status Moderator Last intervention   11 562
     
    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.
    0
    1. sabreb
       
      Thank you !!!
      0
    2. trole
       
      Hello, I have an issue when I use this function, Word says Runtime Error "4608" Value out of range ...
      0