FAQ Home :
How do you find the exact version number of Notes?
How do you find the exact version number of Notes?

AnswerThe following converts the version number, including lettered versions, to dotted decimal format for easy comparison. 4.6.3b becomes version 4.6302, which is definitely a "higher" version than 4.6.2a (4.6201 in this code).
' from Scott Purl (spurl@acm.org)
' Yep. Only one Dim. Session.NotesVersion holds the key.
Dim Session As New NotesSession
' Find out the version information
MyVersion = Session.NotesVersion
' Get the length of the version string
Length = Len(MyVersion)
' Discover What the "half" delimiter is, meaning what's the first non-alphanumeric character starting from the left
' Note that in the North American and International versions, this first non-alpha character differs
If MyVersion Like "*Intl*" Then
SepChar = "("
OffSet = 0
Else
SepChar = "|"
OffSet = 2
End If
' Now find this first non-alphanumeric character
SepLoc = Instr(MyVersion, SepChar)
' Get everything to the left of that character
LeftHalf = Left(MyVersion, SepLoc - 1)
' Find the only space in the left half
SpacLoc = Instr(LeftHalf, " ")
' The version number is what's left to the right of the space in the left half, minus extra spaces
' code (with bug) was VerNum = Trim(Right(LeftHalf, SpacLoc - OffSet))
VerNum = Trim(Right(LeftHalf, Len(LeftHalf) - SpacLoc - OffSet))
' Get the length of the version number
VerLen = Len(VerNum)
' Loop through the version number to remove periods
For x =1 To VerLen
CurChar = Mid(VerNum, x, 1)
If CurChar = "." Then
' Do Nothing
Else
' Keep appending non-period characters until finished
SubVer = SubVer & CurChar
End If
Next
' If the right-most character is a letter, convert it to a number
' "a" becomes "01", and "z" becomes "26"
RSubVer = Right(SubVer, 1)
If Instr("abcdefghijklmnopqrstuvwxyz", RSubVer) Then
' The first 9 letters of the alphabet need a padding leading zero
If Instr("abcdefghi", RSubVer) Then
AlphaNum = Instr("abcdefghi", RSubVer)
NewSubVer = Left(SubVer, Len(SubVer) -1) & "0" & AlphaNum
End If
' The rest of the alphabet are all greater than 10 in position
If Instr("jklmnopqrstuvwxyz", RSubVer) Then
AlphaNum = Instr("abcdefghijklmnopqrstuvwxyz", RSubVer)
NewSubVer = Left(SubVer, Len(SubVer) -1) & AlphaNum
End If
' And the numeric equivalent of the position is
SubVer = NewSubVer
End If
' Assemble it into leftmost character, plus a period, plus the rest of the iterated sub version
TextVer = Left(SubVer, 1) & "." & Right(SubVer, Len(Subver) -1)
' Convert it to a normal number so we can do quick comparisons.
FinVer = Cstr(TextVer)
You can then do:
If FinVer >= 4.6302 Then
'Action if True
Else
'Action if False
End If
Attachments -none-
Applies to versions4.x; 5.x; 6.x
FAQ Provided Byken yee
CreditClick here for information source
 Forum Latest Entries
29/07/2010 Lotus Notes Forum - AppendDocLink to Doc in Db-A to from a Doc in Db-B    (Rus)
28/07/2010 Lotus Notes Forum - Get Document from another db and appenddoc link to a field in source    (Rus)
24/06/2010 Lotus Notes Forum - Lotus Notes 6.5 Programming Certification Test    (Charles)
21/06/2010 Lotus Notes Forum - Consult    (Rogers )
09/06/2010 Lotus Notes Forum - #error : Must specify type of OS ("DOS", "OS2", etc) on C command line    (Abhi)
31/05/2010 Lotus Notes Forum - Note mail error    (Anonymous)
28/05/2010 Lotus Notes Forum - lotus notes 8 calendars & email setup...    (Dermick Vaughn)
19/05/2010 Lotus Notes Forum - Stop sending delivery and read receipts    (Simon)
19/05/2010 Lotus Notes Forum - Folder Restore Tool v2.5 is released, try for ten databases for free    (Kim van den Berg)
19/05/2010 Lotus Notes Forum - Try our Archive Solution for free for ten databases (mail/applications/quickr places)    (Kim van den Berg)
14/05/2010 Lotus Notes Forum - Adobe fillable form submit Email button not working with lotus    (Anthony )
12/05/2010 Lotus Notes Forum - Recipients on archived mails differ from regular mail    (Borja)
03/05/2010 Lotus Notes Forum - Name change only partially works    (Anonymous)
02/05/2010 Lotus Notes Forum - How to edit value in MASTER from, and backupdate MAIN form??    (Julee)
22/04/2010 Lotus Notes Forum - Note 8 Alarms Not Working    (Tony D)
07/04/2010 Lotus Notes Forum - Lotus Notes Agent to send an e-mail every month    (Lorant)
31/03/2010 Lotus Notes Forum - Lotus Notes C++, LNText Item, Unicode    (Matt)
19/03/2010 Lotus Notes Forum - Searching for a date in a document collection    (Kris Mitchell)
16/03/2010 Lotus Notes Forum - Lotus CAPI --> CSharp    (HW)
12/03/2010 Lotus Notes Forum - Notes IMAP connection    (Charl)
 Latest Tips & Tricks
10/07/2009Terminal Services Tips & Tricks - How to kill terminal server sessions. Utilities for terminal services: qwinsta and rwinsta(Steven Charles Robinson)
10/07/2009.NET Tips & Tricks - The type or namespace name could not be found (are you missing a using directive or an assembly reference?)(SCRobinson)
10/07/2009Terminate Lotus Notes Processes, Error Tips & Tricks - Lotus Notes: An Error Was Encountered While Opening A Window(Steven Charles Robinson)
26/04/2007LotusScript Mail, SMTP, Spam, Junkmail Tips & Tricks - How to drag and drop spam into junk mail filter using LotusScript(Steven Charles Robinson)
31/10/2006Terminate Lotus Notes Processes, Error Tips & Tricks - Lotus Notes: An Error Was Encountered While Opening A Window(Steven Charles Robinson)
23/10/2006Errors, SMTP, Internet Sites, Configuration, Administration, Domino 7 Tips & Tricks - Domino authentication is not enabled in the smtp internet site document(Steven Charles Robinson)
20/10/2006Articles Tips & Tricks - Have you see our recent arcticle in "The View": Proven techniques for abstracting UI from data using XML, XSL and Domino.(Steven Charles Robinson)
26/09/2006.NET Tips & Tricks - If your looking for .NET tips visit http://www.codedotnet.net(S C Robinson)
25/09/2006Using Lotus Notes Tips & Tricks - Save the Window state of a Lotus Notes client on shutdown.(Steven Charles Robinson)
22/09/2006NET, Culture, Globalization Tips & Tricks - How to find out the current culture in a .NET application.(Steve C Robinson)
© 2003 notes411.com. All rights reserved. Disclaimer. site designed & developed by appsworks.com
Lotus Notes is a registered trademark of IBM. This site is not affiliated with IBM or Lotus.
 News

 Google Box
 Sponsor
ClearCase, Subversion, WebSphere Consulting
 Best in the Industry
Lotus Notes & Domino FAQ