Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 09-10-2022, 08:43 PM
BrianHoard BrianHoard is offline New to Macros: Cannot remove Header/Footer: MS Word Windows 10 New to Macros: Cannot remove Header/Footer: MS Word Office 2019
Advanced Beginner
 
Join Date: Jul 2022
Location: Haymarket, VA USA
Posts: 85
BrianHoard is on a distinguished road
Default

Sounds to me like you may simply be entering your code in the wrong place. Hard to tell by your question. But I just did a quick test with your code and it worked on a small 2 page document, so it may work for you.
To use your script, try these steps...
  1. Open a copy of your 900 page document (working with a backup in case something goes wrong.)
  2. As an initial test, I'd delete 880 pages, so you have something easy to work with as you test this out.
  3. Press Alt F11 to open the Visual Basic editor.
  4. Right-click on your document in the Project area (screen shot attached), and select Insert Module
  5. Double-click on the module and paste in your code in the VBA code area.
  6. If all looks good, no red text, press F5 or press the play button to run your code.
If you get an error or anything doesn't work, please post the exact error you receive.
Attached Images
File Type: png wordSnap.png (219.8 KB, 14 views)
Reply With Quote
Reply

Tags
footer, header, macro word



Similar Threads
Thread Thread Starter Forum Replies Last Post
New to Macros: Cannot remove Header/Footer: MS Word how to remove 'header' 'footer' labels? abrogard Word 2 05-15-2022 06:50 PM
Adding text to the header and footer without removing all other content in the header and footer digitalelise Word VBA 2 10-23-2019 02:58 AM
Add, Resize & Relocate Header & Footer with Macros Sarah123 Word VBA 11 11-13-2018 07:15 AM
New to Macros: Cannot remove Header/Footer: MS Word Can't remove header & footer formatting ... frangipan Word 2 07-11-2014 12:27 PM
How do I remove header and footer captn1 Word 2 09-04-2010 04:14 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:37 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft