Das mit den Symbolleisten finde ich nicht gut gelöst. Früher waren die SmartIcons noch richtige Dateien im Verteichnis W32. Jetzt werden die Symbole und Formeln in der Bookmark.nsf gespeichert. Und wenn die gelöscht wird, war's das
In der KBASE habe ich zu den Problem folgendes gefunden:
Title:
Upgrading Notes Client Results in Loss of Custom Toolbar Buttons
Product: Lotus Notes > Lotus Notes > 6.x, 5.x
Platform(s): Platform Independent
Document Number: 1116386 Date: 10.09.2003
This document is based on the following :
About SPRs
SPR Number SPR Status SPR Fixed Release
TKIE5LQ8G2 Open/Reproduced Not Applicable
Problem
After an upgrade to the Notes 6.0.2 Client, you notice that your custom toolbar buttons or images are not available. How do you prevent this from happening?
This issue has been reported to Lotus Software Quality Engineering.
When an upgrade occurs, the Notes Client checks the Notes.ini parameter, "templatesetup=" to determine if the design of certain databases such as the Bookmark database (Bookmark.nsf) and Personal Address Book database (Names.nsf) need to be updated. Outlines and images associated with the Toolbar buttons do not have the property, "Prohibit Design Refresh or Replace to Modify" selected due to the upgrade from 5.x to 6.x. As a result the outlines and images are removed from the Bookmark.nsf. A workaround to prevent this from happening is provided below.
This issue can also occur with inserted image resources used for Toolbars buttons added in the 6.0.1 Bookmark database. To prevent these images from being removed by the upgrade, open the Bookmark database in Domino Designer and navigate to Shared Resources, Images. Highlight the image, right-click and open the resource properties. On the Design tab, enable the property "Prohibit Design Refresh or Replace To Modify" by selecting its checkbox.
SmartIcons used by the Notes 5.x Client are added automatically to the Bookmark database when an upgrade of the Notes Client to the 6.x codestream occurs. To access these icons go to File --> Preferences --> Toolbar Preferences and select Customize.
A new 6.x Bookmark database will not exhibit this issue because it has the property "Prohibit Design Refresh or Replace to Modify" enabled for the outlines.
Workaround:
1. Open the Bookmark.nsf in Domino Designer and set the "Prohibit Design Refresh or Replace To Modify" property on the Outlines: UserToolbar, UserToolbarManager, and UserToolbarPOD.
Note: Any images in shared resources associated with the toolbars should also have the "Prohibit Design Refresh or Replace to Modify" option set before upgrading the client.
2. Use this sample code:
IMPORTANT NOTE: The below is a sample script, provided only to illustrate one way to approach this issue. Notes Support will not be able to customize this script for a customer's own configuration. While this may work for some customers it is offered as a suggestion only, and is not something that Lotus Software supports further.
Create a memo and create a button in it and choose LotusScript. In the Declarations variable place the following:
Declarations:
Declare Function NSFDbOpen Lib "nnotes.dll" (Byval filename As String, hDB As
Long) As Integer
Declare Function NSFDbClose Lib "nnotes.dll" (Byval hDB As Long) As Integer
Declare Function NIFFindDesignNoteExt Lib "nnotes.dll" (Byval hDB As Long,
Byval SearchValue As String, Byval NClass As Long, Byval bla As String , NoteID
As Long, Byval flags As Long) As Integer
Declare Function NSFNoteOpen Lib "nnotes.dll" (Byval hDB As Long, Byval NoteID
As Long, Byval flags As Long, hNote As Long) As Integer
Declare Function NSFNoteClose Lib "nnotes.dll" (Byval hNote As Long) As Integer
Declare Function NSFItemSetText Lib "nnotes.dll" (Byval hNote As Long,
Byval FieldName As String, Byval NewValue As String, Byval lenth As Long) As
Integer
Declare Function NSFNoteUpdate Lib "nnotes.dll" (Byval hNote As Long, Byval
flag As Long) As Integer
Initialize Event:
In the Initialize event place the following:
%REM
This agent enables the property "Prohibit design refresh or replace to modify"
for all image resources in the current database. This property is set by
appending "P" to the $Flags item of the image resource.
IMPORTANT NOTE: Before running this script make a backup
of any/all databases that will be processed by it.
%END REM
Dim s As New notessession
Dim db As New notesdatabase("","Bookmark.nsf")
Dim nc As NotesNoteCollection
Dim note As notesdocument
Dim noteID As String
Set nc = db.CreateNoteCollection(False)
nc.SelectImageResources = True
Call nc.BuildCollection
noteID = nc.GetFirstNoteId
For i = 1 To nc.Count
Set note = db.getdocumentbyID( noteID )
'only process img reources lacking the protect bit.
If Instr( 1, note.~$Flags(0), "P", 5) < 1 Then
note.~$Flags = note.~$Flags(0) & "P"
Call note.save( False, False )
ModCount% = ModCount% + 1
End If
noteID = nc.GetNextNoteId( noteID )
Next
Msgbox "Modified: " & Cstr( ModCount% ) & " Image Resources in: " & db.FilePath
End Sub
Click Event:
In the Click event add the following:
Sub Click(Source As Button)
Dim hDB As Long
Dim erro As Integer
Dim dbName As String
Dim NoteID As Long
Dim s1 As String
Dim NClass As Long
Dim flags As Long
Dim hNote As Long
Dim NewValue As String
Dim FieldName As String
Dim Length As Long
Dim i As Integer
NewValue = "m34P"
FieldName = "$Flags"
Length = Len(NewValue)
Dim mysearch(3) As String
mysearch(1) = "UserToolbar"
mysearch(2) = "UserToolbarManager"
mysearch(3) = "UserToolbarPOD"
flags =0
s1 = "+m"
NClass = 32767
DbName = "bookmark.nsf"
erro = NSFDbOpen (dbName, hDB&)
If erro = 0 Then
For i=1 To 3
erro = NIFFindDesignNoteExt (hDB, mysearch(i), NClass,s1 ,NoteID,flags)
If NoteID > 0 Then
erro = NSFNoteOpen(hDb, NoteID, flags, hNote)
If erro = 0 Then
erro = NSFItemSetText(hNote, FieldName, NewValue, Length)
If erro = 0 Then
flags = 1 ''force update
erro = NSFNoteUpdate(hNote, flags)
End If
erro = NSFNoteClose(hNote)
End If
End If
Next
End If
Call NSFDbClose (hDb)
End Sub
Andreas