How to add a SmartIcon to users toolbars via script or formula?

Can’t seem to find much on this topic on notes.net. Anyone know how to do this in ND6?

  • Tim E Brown

Subject: How to add a SmartIcon to users toolbars via script or formula???

Hi,

i tried a lot and the only way i got it working is this:

At first:

The toolbars are stored in the local “bookmarks.nsf” in the outline called “UserToolbar”. Every toolbar represents an outline entry “on the first level” and the smarticons are outline entries “on the second levels”.

The problem is that the actual formula and the icon of each smarticon are stored somehow “differently” and they can’t be manipulated anyway. (At least i don’t know how :-(()

However the whole outline entry itself can be changed. This means that you can move it around, delete it and you can copy it from an other outline in a different “bookmarks.nsf”.

This really works nicely. But the changes will appear only after the user restarts the notes-client.

I got a working solution with which i distributed a fully new toolbar with tree smarticons to many users. The way i did this was:

  1. At first I created the smarticons on my own client. After this I copied the whole outline “UserToolbar” from my “bookmarks.nsf” to an empty database on the server.

  2. Then I send the users a mail containing a button with Lotus-Script-Code.

The code opens the users “UserToolbar” and the outline in the servers database.

It then copies the “special” outline entries into the users local “UserToolbar”

At last it tells the user to restart the client.

This way I can even “refresh” my smarticons i I ever need to change the code. Moreover this method does not overwrite any individual changes which the user already had in his toolbars. It really only adds the new smart icons.

I dont have the code right now but i will post it here once i get back to my office (which will be on friday)

Bye

Hynek

Subject: RE: How to add a SmartIcon to users toolbars via script or formula???

Finally figured it out thanks to your great tip of copying the outline and outline entry from another database!

Thanks,

Tim E Brown

Subject: RE: How to add a SmartIcon to users toolbars via script or formula???

Hi Tim

Can you post the code.

Thanks

Julie

Subject: RE: How to add a SmartIcon to users toolbars via script or formula???

Hi Julie

Are you finished your search?

Can you post the code.

Thanks

F

Subject: RE: How to add a SmartIcon to users toolbars via script or formula???

Can You help me.Why if I`m adding toolbar or outline from designer or by LotusScript its not visible at Notes cliet?

Subject: RE: How to add a SmartIcon to users toolbars via script or formula???

Yes! Please post your code once you get back into the office!

Thanks!,

Tim E Brown

Subject: How to add a SmartIcon to users toolbars via script or formula???

In Notes 6, Lotus changed the whole concept of the Smarticons (they’re not even called smarticons anymore, but Toolbar icons). Where in R5 the Smarticons were separate files, they’re now integrated in the bookmark.nsf database. There’s immediately one way to get toolbar icons at a user: replace the design of their bookmark.nsf database. However, usually that’s not really a desired method. There’s another method and that’s by using the new DXL import & Export classes of Domino 6. You can create a Toolbar icon in your own toolbar. Find the design of the icon back in your bookmark.nsf database and export it. Now write an agent in LotusScript that detaches this file to the local drive of the user and then imports it into their bookmark.nsf. I believe the main problem with the method was that the exported toolbar icon-file contains the hardcoded path to your Notes data directory and if the Notes data directory of the user is in a different location the import won’t work. As all data directories of my users were in the same spot, I didn’t bother trying to find a workaround for that.

If you want I can post the agent code for the importing, but it’s somewhere in an archive at home, so it might take a while. If I remember right it’s pretty straight forward once you know where to start.

Last remark, back then (Notes 6 beta and Notes 6.0) I discussed the lack of simple tools for importing toolbar icons with the Lotus developers and they promised to implement some functions to make this easier (other than the DXL functions). Haven’t seen them yet, but haven’t been looking that carefully either (as the DXL functions work pretty well).

Subject: RE: How to add a SmartIcon to users toolbars via script or formula???

Thanks for the information and update!!!

Please post the code. I would like to use it as a starting point.

Thanks!,

Tim E Brown

Subject: RE: How to add a SmartIcon to users toolbars via script or formula???

Hello,

is anybody please able to post the code! It would be really nice to get it.

Thanks

Regards