T
TRM
I am trying to set up code to automatically accept
changes in a document, but only changes to doc variables
on title page of doc) - not changes to the body. Please
forgive my ignorance! I have been able to accept one at
a time, but not move along to each. The code below keeps
giving me errors that the item doesn't exist in this
group (obviously not the exact error). The error comes
on the "... .fields.item(r).type = ... " statement.
THANKS for your suggestions, references & help!
Dim r As Integer
r = ActiveDocument.Revisions.count
Do While r > 0
'keep getting error messages that this does not
exist. Need to find a way to check if
If ActiveDocument.Fields.Item(r).Type =
wdFieldDocVariable Then
ActiveDocument.Fields.Item(r).Select
If (Selection.Range.Revisions.Item(r).Type =
wdRevisionInsert) Or (Selection.Range.Revisions.Item
(r).Type = wdRevisionDelete) Then
'ActiveDocument.Range.Select
Selection.Range.Revisions.Item(r).Accept
'Item(r).Accept
End If
End If
r = r - 1
Loop
'End If
changes in a document, but only changes to doc variables
on title page of doc) - not changes to the body. Please
forgive my ignorance! I have been able to accept one at
a time, but not move along to each. The code below keeps
giving me errors that the item doesn't exist in this
group (obviously not the exact error). The error comes
on the "... .fields.item(r).type = ... " statement.
THANKS for your suggestions, references & help!
Dim r As Integer
r = ActiveDocument.Revisions.count
Do While r > 0
'keep getting error messages that this does not
exist. Need to find a way to check if
If ActiveDocument.Fields.Item(r).Type =
wdFieldDocVariable Then
ActiveDocument.Fields.Item(r).Select
If (Selection.Range.Revisions.Item(r).Type =
wdRevisionInsert) Or (Selection.Range.Revisions.Item
(r).Type = wdRevisionDelete) Then
'ActiveDocument.Range.Select
Selection.Range.Revisions.Item(r).Accept
'Item(r).Accept
End If
End If
r = r - 1
Loop
'End If