June 8 2009 Monday
Updated Domino Quickr versioning code - add versioning back after an upgrade
Below is a much less hacky update to my original fix to add versioning back into Domino Quickr.
This version will add implicit versioning to all forms and all documents that have "none" as the versioning. This will affect all forms and documents stored in all Quickr places on a server. As always don't use it unless you have tested it and YMMV. It has been tested on Quickr 8.2 for Domino.
This is way faster and cleaner than the original.
This version will add implicit versioning to all forms and all documents that have "none" as the versioning. This will affect all forms and documents stored in all Quickr places on a server. As always don't use it unless you have tested it and YMMV. It has been tested on Quickr 8.2 for Domino.
This is way faster and cleaner than the original.
Sub Initialize
Dim s As New NotesSession
Dim dbdir As New NotesDbDirectory("YOUR_QUICKR_SERVER_NAME")
Dim db As NotesDatabase
Dim view As NotesView
Dim doc As NotesDocument
Set db = dbdir.GetFirstDatabase(DATABASE)
Do Until db Is Nothing
If db.Open("","") Then
Print db.Title
If Ucase( db.FileName) = "MAIN.NSF" Then
Set view = db.GetView("System\Forms")
If Not(view Is Nothing) Then
Set doc = view.GetFirstDocument
Do Until doc Is Nothing
If doc.h_VersionType(0) = "none" Then
Print "found "+doc.h_Name(0)
doc.h_VersionType = "implicit"
Call doc.Save( False, False )
End If
Set doc = view.GetNextDocument(doc)
Loop
End If
Set view = db.GetView("System\Docs By Folder ")
If Not(view Is Nothing) Then
Set doc = view.GetFirstDocument
Do Until doc Is Nothing
If doc.h_VersionType(0) = "none" Then
Print "found "+doc.h_Name(0)
doc.h_VersionType = "implicit"
Call doc.Save( False, False )
End If
Set doc = view.GetNextDocument(doc)
Loop
End If
End If
End If
Set db = dbdir.GetNextDatabase
Loop
End Sub