Hello everyone. I need to create a macro that: 1. open a new section in the middle of the document, so the first section will be section 1, the second section section 2, and the third section section 3. 2. Changes the layout of section2 to - landscape. 3. Deletes the footers of section 2 and section 3 (and not of section1). I have succeeded to create this manually, but when I'm trying to make a macro from this, I cant get the footers right... Please Help me!!
Use when the cursor is located where you want to insert the first section break.: Selection.InsertBreak wdSectionBreakNextPage Selection.InsertBreak wdSectionBreakNextPage ActiveDocument.Sections(2).PageSetup.Orientation = wdOrientLandscape For i = 2 To 3 With ActiveDocument.Sections(i) With .Footers(wdHeaderFooterFirstPage) .LinkToPrevious = False .Range.Delete End With With .Footers(wdHeaderFooterPrimary) .LinkToPrevious = False .Range.Delete End With End With Next i -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP "iris" wrote in message news:0E97228A-46EA-4C9C-8B0B-2487988CA31C@microsoft.com... > Hello everyone. > > I need to create a macro that: > 1. open a new section in the middle of the document, so the first section > will be section 1, the second section section 2, and the third section > section 3. > > 2. Changes the layout of section2 to - landscape. > 3. Deletes the footers of section 2 and section 3 (and not of section1). > > I have succeeded to create this manually, but when I'm trying to make a > macro from this, I cant get the footers right... > > Please Help me!! >