Manage Learn to apply best practices and optimize your operations.

Get Exact Notes Version Number


Function GetNotesVersion As String
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
VerNum = Trim(Right(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.
GetNotesVersion= Cstr(TextVer)

End Function

Dig Deeper on Domino Resources - Part 4

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchWindowsServer

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchDataCenter

SearchContentManagement

Close