Why not use DDM API, I think it's more proper to do that.
Please refer to Programer's guide.
Example:
Sub Initialize
'Declare all API objects as Variants
Dim theApi As Variant
Dim theLibrary As Variant
Dim theCabinets As Variant
Dim theBinders As Variant
Dim theDocuments As Variant
Dim theDocument As Variant
'Create the Api object
Set theApi = CreateObject("DominoDoc.API")
'Set the login name and password
Call theApi.SetHttpLogin("admin", "password")
'Get the Library object from the Api
Set theLibrary = theApi.GetLibrary("
http://hostname/domdoc/mikelib1lib.nsf")
'Get the Cabinets object from the Library
Set theCabinets = theLibrary.Cabinets
Set theBinders = theCabinets.ItemByTitle("mikecab1").Binders
Set theDocuments = theBinders.ItemByTitle("mikebinder1").Documents
count = theDocuments.count
If count > 0 Then
For i = 0 To (count - 1)
Set theDocument = theDocuments.ItemByIndex(i)
theDocument.DeleteAllRevisions
Next
End If
End Sub