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
Envoyer par mail ce bouton en attachant tous les fichiers icones, vos utilisateurs pouront mettre à jour leurs SmartIcons par un simple click et recevront un mail de rapport:
'======================================================================
' Code Documentation
'======================================================================
'Originally Written By: James Fox @ Com Tech Communications
'Originally Created On: 1/3/97
'Last Updated By: James Fox
'Last Updated On: 1/3/97
'Last Updated On: 1/10/04
'======================================================================
' Declare Variables
'======================================================================
Dim session As New NotesSession
Dim ws As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Dim doc As NotesDocument
Dim rtitem As Variant
Dim iconPath As String
Dim retvalue As Variant
Dim fileName As String
On Error Goto errorRoutine
'======================================================================
' Warn User what is going to happen
'======================================================================
x = Messagebox("SmartIcon Installer met à jour votre barre d'icône. La barre Universelle courante est écrasée par la nouvelle. Votre configuration est sauver dans un fichier universe.bak. OK pour Continuer", 1 + 64 + 0 + 0,"SmartIcon Installer")
If x <> 1 Then
x = Messagebox("SmartIcon Setup annuler Merci.",0 + 48 + 0 + 0,"SmartIcon Setup")
End
End If
'======================================================================
' Get and Set Icon Path
'======================================================================
iconPath = session.GetEnvironmentString("WinNTIconPath", True) + "\"
Chdrive Left(iconPath,3)
Chdir iconPath
'======================================================================
' Backup current universal Set
'=====================================================================
fileName = Dir$(iconPath + "universe.bak", 0)
If fileName <> "" Then
Kill iconPath + "universe.bak"
End If
Name iconPath + "universe.smi" As iconPath + "universe.bak"
'======================================================================
' Detach Files in memo (overwriting existing files)
'=====================================================================
Set uidoc = ws.CurrentDocument
Set doc = uidoc.Document
Set rtitem = doc.GetFirstItem( "Body" )
notesEmbeddedObject = rtitem.EmbeddedObjects
If ( rtitem.Type = RICHTEXT ) Then
Forall o In rtitem.EmbeddedObjects
objectName = o.Name
fileName = Dir$(iconpath + objectName, 0)
If fileName <> "" Then
Kill iconpath + fileName
End If
Call o.ExtractFile(iconPath + objectName )
End Forall
End If
'======================================================================
' Notify User of SmartIcon Installer Status
'=====================================================================
x = Messagebox("SmartIcon Setup a terminé. Votre configuration smartIcon orriginale est suaver sous Universe.bak. Redemarrer Notes pour utiliser la nouvelle barre de SmartIcons",0 + 64 + 0 + 0,"SmartIcon Setup")
End
'======================================================================
' This is the general error routine
'=====================================================================
errorRoutine:
x = Messagebox("SmartIcon Setup Incomplet. Merci de prevenir votre assistance Informatique par e-mail. ",0 + 48 + 0 + 0,"SmartIcon Setup")
Name iconPath + "universe.bak" As iconPath + "universe.smi"
End
End Sub
Technique origale initialement signalée par Linda Ruiz (sur Notes.net):
1. Assurez ce masque est seulement disponible pour le web sinon vous risquez des problème d'affichage - inoffensifs toutefois.
2. Quand lotus changera les paramètres de vue, ou le mécasnime des vues incluses, ceci ne fonctionnera probablement plus.
Incluez votre première vue normalement normalement.
Puis Collez le code ci-dessous dans le masque comme code HTML, changez les noms pour protéger les innocents. Si vous avez des doutes, faire un masque incluant la vue à inclure et regarder le code depuis un navigateur WEB.
Note la table est facultative.
Le code est disponible ici en remplacant le [ par des < et les ] par des >
[TABLE BORDER=0][TR VALIGN=top][TD WIDTH="595" BGCOLOR="E0E0FF"] !--]
[!-- [APPLET NAME="view" CODE="lotus.notes.apps.viewapplet.ViewApplet.class" CODEBASE="/domjava" ARCHIVE="nvapplet.jar" ALT="View" WIDTH="594" HEIGHT="144"] !--]
[!-- [PARAM NAME="cabbase" VALUE="nvapplet.cab"] !--]
[PARAM NAME="Database" VALUE="[Computed Value]"]
[PARAM NAME="ViewName" VALUE="evwHotItems"]
[PARAM NAME="PanelStyle" VALUE="LINE_BORDER"]
[PARAM NAME="ViewUNID" VALUE="8095d6a60b7e08d2852569530009078f"]
[PARAM NAME="bgColor" VALUE="E0E0FF"]
[PARAM NAME="RestrictToCategory" VALUE="Software"]
[PARAM NAME="locale" VALUE="en"]
[PARAM NAME="IconPath" VALUE="/icons"]
[/APPLET]
[/TD][/TR][/TABLE]
A passer en revue, vous DEVEZ changer les paramètres de ViewName, de ViewUNID et de RestrictToCategory avec vos valeurs.
Si vous ne savez pas que le viewUNID créent simplement un masque factice, incluant la vue, depuis browser visualiser le source et copiez la code pour ViewUNID à votre code.
Vos Suggestions sont appréciés.
Un weblog ... C'est une nouvelle génération de sites internet interactifs et vivants : un véritable phénomène de société.
C'est un espace de libre expression qui vous permet, sans aucune connaissance technique de publier vos idées, votre actualité, sur internet et de recevoir presque instantanément l'avis de vos lecteurs.
Dès que vous avez quelque chose à dire, sur un sujet qui vous touche, vous amuse, vous choque, si vous voulez partager votre savoir, vos passions, le blog est là.
Bref un forum... Probablement