Smart Icon for special attachments

Any suggestions on a Smart Icon that can be used to attach files, but always starts in a specific (favorites!) folder?

The normal attach icon works fine, but I’ve had a user request an icon that always puts them in a particular folder.

Subject: Smart Icon for special attachments

The easiest way is probebly to manipulate the notes.ini variable called “FileDlgDirectory” before invoking the attachment code.

Subject: RE: Smart Icon for special attachments

Make sure I’m getting this right, setup a smart icon that would update the FileDlgDirectory variable in the notes.ini that then calls on the attachment code?

Heck, I guess just having an icon that simply sets that variable to their favorite directory means they are 2 quick button clicks (set, and then attach) away from being where they want to be to attach files.

I’m just not sure how you accomplish this (formula) with a smart icon.

Subject: RE: Smart Icon for special attachments

The easiest way to actually do this so it works is to trigger an agent in a shell database from a smarticon. Why? Because you can’t set “system” ini variables in @Formula as far as I know, you can only do this in Lotusscript.

As an example, this code won’t work:

@SetEnvironment(“FileDlgDirectory”; “c:\YOUR DIRECTORY”);

@Command([EditGotoField]; “Body”);

@Command([EditInsertFileAttachment])

Try it and you’ll see why: instead of manipulating the FileDlgDirectory variable, a new one called $FileDlgDirectory is created, This is where this Lotusscript would be required instead:

Call NotesSession.SetEnvironmentVar(“FileDlgDirectory”, “C:\YOUR DIRECTORY”, True)

Now, you can’t call LS in a smarticon, hence the container database requirement, in which a Lotusscript agent can reside. Seems like a lot of work for a lazy user though!

HTH