i have this code
word_fichier_template.Tables(1).Range.Copy
'Pasting the table in every section of my document
With word_fichier.Sections(1).Footers(wdHeaderFooterPrimary).Range
.Collapse wdCollapseStart
.Paste
End With
'Working fine, pasting the table in the second section
word_fichier_template.Tables(2).Range.Copy
With word_fichier.Sections(2).Headers(wdHeaderFooterPrimary).Range
.Collapse wdCollapseStart
.Paste
End With
I want to copy/paste a table in headers and footers in a .docx, i dont understand the thing i put in comment in my code. I also tried Headers(wdHeaderFooterFirstPage).Range
to put the table just on the first page/section but doesnt work.
Here is a sample of my word.
CodePudding user response:
Your footers are linked - see the tag at the top right of the footer - "Identique au précédente". Turn that setting off and the footers in Section 2 will not be the same as Section 1.
To get a different footer on the first page of a section you need to change the setting in Page Layout.