View Single Post
 
Old 07-04-2023, 05:39 AM
kae0088 kae0088 is offline Windows 7 64bit Office 2010 32bit
Novice
 
Join Date: May 2012
Location: Melbourne, Australia
Posts: 20
kae0088 is on a distinguished road
Default Error 5852 when stepping through revisions

The following code works on documents with a moderate number of revisions. But on a document with 7672 revisions is raises a 5852 error on the 3448th revision. There is nothing wrong with this revision and adding or deleting previous revisions just moves the stopping point to another revision.
Code:
Sub StepRevisions()
    Dim Rv As Revision
    For Each Rv In ActiveDocument.Revisions
         RvType = Rv.Type
    Next Rv
End Sub
There seems to be no way of trapping this error.


Furthermore, each time "For Each Rv In ...." is executed takes many seconds resulting in a very long processing time. One would expect that stepping through a collection would be fast.

Code:
For k=1 to RvMax
  Set  Rv = ActiveDocument.Revisions
takes even longer time.

Can anyone help me with these problems?
Reply With Quote