Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How Do I Delete all Frames from Footers in Microsoft Word

Posted on 2009-04-09
2
Medium Priority
?
427 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 800 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: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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

I'm writing to share my clumsy experience in using this elegant tool so you can avoid every stupid mistake I made. (I leave it to the authorities to decide if this deserves a place in the Knowledge archives.)  Now that I am on the other side of my l…
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
This Micro Tutorial well show you how to find and replace special characters in Microsoft Word. This is similar to carriage returns to convert columns of values from Microsoft Excel into comma separated lists.
In a previous video Micro Tutorial here at Experts Exchange (http://www.experts-exchange.com/videos/1358/How-to-get-a-free-trial-of-Office-365-with-the-Office-2016-desktop-applications.html), I explained how to get a free, one-month trial of Office …

618 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