Revisions Marks

S

Stephen

In Word 2003, when I loop throught the revisions marks, in some cases, I
get an error message "object is required". What should I do to avoid this?
Any help would be appreciated.

For Each oRev In Application.ActiveDocument.Revisions

If Not (oRev Is Nothing) Then

If oRev.Type = wdRevisionDelete Or oRev.Type =
wdRevisionInsert Or oRev.Type = wdRevisionReplace Then
If strUser = "" And strDate = "" And bIsCheckHighlight
Then
oRev.Range.HighlightColorIndex = m_colorHighlight
ElseIf Not (strUser = "") And bIsCheckHighlight Then
If UCase(oRev.Author) = UCase(strUser) Then
oRev.Range.HighlightColorIndex = m_colorHighlight
ElseIf Not (UCase(oRev.Author) = UCase(strUser)) Then
oRev.Range.HighlightColorIndex = wdNoHighlight
End If
ElseIf Not (strDate = "") And bIsCheckHighlight Then
If DateValue(oRev.Date) = DateValue(CDate(strDate))
Then
oRev.Range.HighlightColorIndex = m_colorHighlight
End If
Else
oRev.Range.HighlightColorIndex = wdNoHighlight
End If

End If

'If MsgBox(Print_Debug(oRev), vbOKCancel) = vbCancel Then
'Exit Sub
'End If

End If

Next oRev


Thanks in advance.

Stephen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top