Hello all
I'm a raw noob in vba for Word 2010 on Windows7 but getting a lot done copying bits and bobs from google but this one I can't get to work and I don't understand why, this my latest effort, it runs and looks like it's done it but erm, doesn't. In short I want to reject revisions based on Paragraph style, the styles are currently deleted but show because of track changes, thanks.
I'm a raw noob in vba for Word 2010 on Windows7 but getting a lot done copying bits and bobs from google but this one I can't get to work and I don't understand why, this my latest effort, it runs and looks like it's done it but erm, doesn't. In short I want to reject revisions based on Paragraph style, the styles are currently deleted but show because of track changes, thanks.
Code:
Sub findreject()
'
' findreject Macro
'
'
Selection.find.ClearFormatting
Selection.find.Style = ActiveDocument.Styles("Listings_Name")
With Selection.find
.Text = ""
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Do While Selection.find.Execute
Selection.Range.Revisions.RejectAll
Loop
End Sub