Solved

How Do I Delete all Frames from Footers in Microsoft Word

Posted on 2009-04-09
2
419 Views
Last Modified: 2012-05-06
Hi,

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?
0
Comment
Question by:jstlawyers
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 76

Accepted Solution

by:
GrahamSkan earned 200 total points
ID: 24108152
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
                wrdFrame.Delete
            Next wrdFrame
        Next ftr
    Next Sec
End Sub

Open in new window

0
 

Author Closing Comment

by:jstlawyers
ID: 31568527
Many thanks Graham,

This is exactly what i needed.

Appologies for not replying sooner,

John,
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Using Word 2013, I was experiencing some incredible lag when typing.  Here's what worked for me....
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
This video teaches the viewer how to align pictures around text while keeping the text properly aligned in the document.
Learn how to create and modify your own paragraph styles in Microsoft Word. This can be helpful when wanting to make consistently referenced styles throughout a document or template.

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question