Solved

How Do I Delete all Frames from Footers in Microsoft Word

Posted on 2009-04-09
2
408 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
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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Word 2007 formatting 13 45
Upgrading Microsoft WordJ 6 45
Microsoft Word Mass E-Mail Message 10 81
Header of docx file 17 60
Shortcuts in Word Just the other day I had a training for Microsoft and they wanted me to show how well the new Windows and Office behaved on a touch device, which by the way is great, but it was only then that I realized that using keyboard shortc…
Microsoft Word is a program we have all encountered at some point, but very few of us have dug deep into its full scope of features, let alone customized it to suit our needs. Luckily making the ribbon (aka toolbar, first introduced in Word 2007) wo…
In this video, we show how to convert an image-only PDF file into a PDF Searchable Image file, that is, a file with both the image (typically from scanning) and text, which is created in an automated fashion with Optical Character Recognition (OCR) …
This video teaches the viewer how to align pictures around text while keeping the text properly aligned in the document.

759 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now