Hi there,for all those who encounter the duplicate-smarticons-problem when updating the bookmark.nsf to V8: here’s a code which elementates those duplicates. I’m using this in the bookmark.nsf’s “PostOpen” Database-script:
Dim s As New notessession
Dim env As String
env = s.GetEnvironmentString( “DoubleIconsKilled” )
If env = “” Then
Dim thisdb As NotesDatabase
Set thisdb = source.database
Dim outline As NotesOutline
'AFAIK the problem only occurs in "UserToolbar"
Set outline = thisdb.GetOutline("UserToolbar")
Dim oEntry As NotesOutlineEntry
Set oEntry = outline.GetFirst
Dim stoppAnz As Integer
Dim druckenAnz As Integer
Dim entryLevel As Integer
Dim iconList List As String
Dim iconBez As String
Dim delEntry As NotesOutlineEntry
While Not oEntry Is Nothing
entryLevel = oEntry.Level
If entryLevel = 0 Then
Erase iconList
Set oEntry = outline.GetNext(oEntry)
Else
iconBez = oEntry.Label
If Iselement(iconList(iconBez)) Then
'Print "lösche Eintrag " + iconBez + " (" + outline.GetParent(oEntry).Label + ")"
Set delEntry = oEntry
Set oEntry = outline.GetNext(oEntry)
Call outline.RemoveEntry(delEntry)
Else
iconList(iconBez) = iconBez
Set oEntry = outline.GetNext(oEntry)
End If
End If
Wend
Call outline.Save()
Call s.SetEnvironmentVar("DoubleIconsKilled", "1")
End If
Due to the environment-var, it will only run one time. You can put this code in an agent too…
HTH,
Buzzy