Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 11-16-2017, 02:12 AM
liliaroma liliaroma is offline Windows 7 64bit Office 2013
Novice
 
Join Date: Nov 2017
Posts: 14
liliaroma is on a distinguished road
Default How to delete automatically 500 “Heading 4” and all the contents in this from Navigation?

Hi guys,


I’m working with many cooking document files and having a question with these. Each cooking file has nearly 500 recipes and each recipe has a “Nutrition” part in “Heading 4” format. My task is that I have to delete all the Nutrition parts and contents in these.

Usually, I do it manually by clicking right mouse at Heading Nutrition from Navigation and selecting “Delete”, but it takes a lot of time hmm..

I know that it is a repeating process and maybe has another method that make it easier and faster. So, who knows the quick method helping me delete all contents of Nutrition parts? Tell me pleaseee. Many thanks!



-----------------------------------------------------

Attached Images
File Type: png 500 Nutrition.png (102.6 KB, 26 views)
File Type: png Delete 500 Nutrition.png (102.0 KB, 26 views)
Reply With Quote
  #2  
Old 11-16-2017, 12:23 PM
Charles Kenyon Charles Kenyon is offline Windows 10 Office 2013
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,137
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

Are you sure you really want to delete this information, rather than hide it? Someone went to a lot of work to gather that.
Reply With Quote
  #3  
Old 11-16-2017, 11:09 PM
liliaroma liliaroma is offline Windows 7 64bit Office 2013
Novice
 
Join Date: Nov 2017
Posts: 14
liliaroma is on a distinguished road
Default

Quote:
Originally Posted by Charles Kenyon View Post
Are you sure you really want to delete this information, rather than hide it? Someone went to a lot of work to gather that.
Thanks for your answer and advice. Actually, I do this with 2 files. One still has Nutrition part and another hasn not. So I want to delete all of this. Can you help me to know the quick method? Thanks a lot!
Reply With Quote
  #4  
Old 11-17-2017, 04:57 AM
macropod's Avatar
macropod macropod is online now Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

You could use a macro like:
Code:
Sub Demo()
Application.ScreenUpdating = False
Dim Rng As Range
With ActiveDocument.Range
  With .Find
    .ClearFormatting
    .Replacement.ClearFormatting
    .Text = "Nutrition"
    .Replacement.Text = ""
    .Forward = True
    .Format = True
    .Style = "Heading 4"
    .Wrap = wdFindStop
    .MatchCase = True
    .MatchWholeWord = False
    .MatchWildcards = False
    .MatchSoundsLike = False
    .MatchAllWordForms = False
    .Execute
  End With
  Do While .Find.Found
    Set Rng = .Duplicate
    Set Rng = Rng.GoTo(What:=wdGoToBookmark, Name:="\HeadingLevel")
    Rng.Delete
    .Collapse wdCollapseEnd
    .Find.Execute
  Loop
End With
Application.ScreenUpdating = True
End Sub
For PC macro installation & usage instructions, see: http://www.gmayor.com/installing_macro.htm
For Mac macro installation & usage instructions, see: https://wordmvp.com/Mac/InstallMacro.html
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #5  
Old 11-18-2017, 07:53 PM
liliaroma liliaroma is offline Windows 7 64bit Office 2013
Novice
 
Join Date: Nov 2017
Posts: 14
liliaroma is on a distinguished road
Default

Awww.. It's really wonderful.! I deleted 500 nutritions with only 1 click.! Now, my task is very easy and quick. Thanks a lottt.. :3
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting default heading levels on the navigation plane MattRNR Word 0 01-04-2016 04:41 AM
I can't change the font of Heading 4 in my table of contents hadigh84 Word 1 07-22-2015 08:56 PM
How to remove HEading 4 from the Table Of Contents elelont3 Word 2 01-17-2015 06:42 AM
Navigation pane Show.Heading level x only NobodysPerfect Word VBA 11 05-09-2014 05:26 AM
How to have this Heading – Table of contents style? Jamal NUMAN Word 0 01-13-2011 06:02 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 05:31 PM.


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