• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 434
  • Last Modified:

How Do I Delete all Frames from Footers in Microsoft Word


I need to delete all frames from the footers of documents and replace these with a new one.  I've got the word macro sorted to create the new frame in the footer.  How can i though first delete the frame using a vb macro?
1 Solution
This will delete all the frames in all the footers in all the sections.
Sub DelFramesInFooters()
    Dim Sec As Word.Section
    Dim ftr As Word.HeaderFooter
    Dim wrdFrame As Word.Frame
    For Each Sec In ActiveDocument.Sections
        For Each ftr In Sec.Footers
            For Each wrdFrame In ftr.Range.Frames
            Next wrdFrame
        Next ftr
    Next Sec
End Sub

Open in new window

jstlawyersAuthor Commented:
Many thanks Graham,

This is exactly what i needed.

Appologies for not replying sooner,

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now