Script to verify employee's Notes version

We needed to get a handle on what version of Lotus Notes were being run by our employees. So, I created this little script, put it into the PostOpen event of the mail template and ran Designer. It records the @Version of the client into the Person Document. It ensures that it only tries this if the user is connected to the server. Therefore, this will not work for anyone who has never connected to the server when opening their mail file. Just create a view in the NAB by NotesClientVersion.
Sub Postopen(Source As Notesuidatabase) 
        Dim Session As New NotesSession         
        Dim Person_Doc As NotesDocument 
        Dim PubNames_DB As NotesDatabase 
        Dim Users_View As NotesView 
        Dim Temp_NN As NotesName 
        Dim UserName_Str As String 
        Dim Server_str As String 
        Server_Str = Session.CurrentDatabase.Server 
        If Server_Str = "" Then Exit Sub 
        Set Temp_NN = New NotesName(Server_Str) 
        Set PubNames_DB = New Notesdatabase (Temp_NN.Abbreviated,"Names.nsf") 
        If PubNames_DB Is Nothing Then Exit Sub 
        Set Users_View = PubNames_DB.GetView("($Users)") 
        If Users_View Is Nothing Then Exit Sub 
        UserName_Str = Session.Username 
        Set Person_Doc = Users_View.GetDocumentByKey(UserName_Str,True) 
        If Person_Doc Is Nothing Then Exit Sub 
        If Person_Doc.NotesClientVersion(0) = Session.NotesVersion Then Exit Sub 
        Person_Doc.NotesClientVersion = Session.NotesVersion 
        Call Person_Doc.Save(True,False) 
End Sub 

This was first published in July 2001

There are Comments. Add yours.

TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.