Need to know the version of Notes/Domino running on every workstation in your company automatically? Make this small change to the mail template, set up a mail-in database, and you'll be collecting information the next day, after redesign occurs that night on the server. Handy when it's upgrade time.
1. Set up a mail-in database (e.g., Mail-in name = VersionControl)
2. Place the code into the code section into the PostOpen event of the Database script in the mail template
3. Modify the constant tversion$ so it contains your target release
When the user opens their mail file for the first time, it will search for $Version in their notes.ini file, and compare with the version they actually have. If they are different, which they will be the first time, it sends a message from the user to the mail in database with their actual release in the subject line. It then writes the information into the notes.ini file, so that the next time they open mail, it will not send another message. If they upgrade, however, they will send mail again with the new version.
Don is a Principal Consultant at Electronic Knowledge Interchange in Chicago, IL and can be reached at dbechtold@eki-consulting.
Code
Const tversion$ = "Release 5.0.6a" 'put your target release here
Dim vlength%
Dim version$
vlength% = Len(tversion$)
Dim s As New notessession
version$ = s.getenvironmentstring("Version")
' only send mail and update notes.ini if
' it has not been sent before, or if version of notes has changed
If Left$(version$, vlength%) <> Left$(s.NotesVersion, vlength%) Then
Call s.Setenvironmentvar("Version", s.NotesVersion)
Dim db As notesdatabase
Dim d As notesdocument
Set db = s.currentdatabase
Set d = New notesdocument(db)
d.form = "Memo"
d.Subject = s.Notesversion
d.SendTo = "VersionControl"
Call d.send(False)
End If