![]() |
|
#2
|
||||
|
||||
|
Without a document to evaluate, and the rest of the code for the process, it is difficult to judge, but based upon what you have presented, I would suggest something like:
Code:
Public Sub Test_Document_AcceptAll(newRevision As Revision, _
newbool As Boolean)
If newbool = True Then
ActiveDocument.Revisions.AcceptAll
Else
On Error GoTo RevErr
Select Case True
Case Left(newRevision.FormatDescription, 15) = "Formatted Table": newRevision.Accept
Case Left(newRevision.FormatDescription, 10) = "Formatted:": newRevision.Accept
Case Left(newRevision.FormatDescription, 11) = "Field Code:": newRevision.Accept
End Select
End If
lbl_Exit:
Exit Sub
RevErr:
If Err.Number <> 5852 Then
Err.Clear
GoTo lbl_Exit
Else
Err.Clear
Resume
End If
End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
| Tags |
| accept changes, word vba |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Conditionally playing a wave file
|
blackjack | Excel Programming | 1 | 10-11-2014 06:25 AM |
| Insert a text conditionally | deboer | Word | 1 | 05-04-2014 03:35 PM |
changing font size conditionally
|
newton.rogers | Excel | 1 | 03-18-2014 12:57 PM |
How to conditionally format this?
|
g4tv4life | Excel | 2 | 03-13-2014 10:58 AM |
Macro to conditionally delete rows
|
Steve_D | Excel | 2 | 08-24-2012 09:37 PM |