
' Note: this will mark even the always-existing stories as not in use if they're empty ' Returns True if "Styname" is use in rngįunction StoryInUse(Stry As Range) As Boolean StyleInUse = False ' Not currently in use.įunction StyleInUseInRangeText(rng As Range, Styname As String) As Boolean If StyleInUseInRangeText(txtFrame.TextRange, Styname) Then StyleInUse = True: Exit Function If StyleInUseInRangeText(Stry, Styname) Then StyleInUse = True: Exit Function If Not ActiveDocument.Styles(Styname).InUse Then StyleInUse = False: Exit Functionįor Each Stry In ActiveDocument.StoryRanges ' Is Stryname used any of ActiveDocument's story Name:=oStyle.NameLocal, Object:=wdOrganizerObjectStylesįunction StyleInUse(Styname As String) As Boolean If StyleInUse(oStyle.NameLocal) = False ThenĪpplication.OrganizerDelete Source:=ActiveDocument.FullName, _ Even if the built-in style is no longer used, but was once used in the document, it will still show up in the styles drop-down list.

In fact, Word doesn't allow built-in styles to be deleted from a document. This is because deleting a built-in style doesn't really delete it, but only resets that style to its original, default condition. Note that the macro ignores a style if it is a built-in style. The following macro, DeleteUnusedStyles, does just that. If it isn't, then the style can be easily deleted. It can quickly search through a document to see if a particular style is used anywhere. You may want to get rid of these styles, but this can be dangerous to the format of your document if you start deleting them without knowing that they really are not in use.

You can opt not to use balloons, displaying all changes inline.In the Advanced Track Changes Options dialog, you have several options that may help:.In the Track Changes Options dialog, click Advanced Options.On the Review tab, in the Tracking group, click the dialog launcher (the little arrow in the bottom right corner).The tracking options are a little harder to get to in Word 2013, though.
