I apologize up front but I am new to designing and have no real background in it. Enough said.
I need to create an action bar that when clicked it drops down a list with 4 choices to choose. After an option is clicked it appends it as a signature to the bottom of the e-mail.
So far I have gone into designer and created the Action Bar with the 4 drop downs and set them as a checkbox type. Really struggling with what code isnecessary to add a piece of text as a signature. Any help would be great. I know this is not an easy response but even tips or clues to helping write this would be so helpful.
Thank you so much Joydeep. That is exactly what I was looking for. Maybe I’m pushing my luck here but is there away for what you just wrote to stay for every message from now on until the user chooses to change the signature to something else? As of now the user will need to set that everytime they send a message. Thanks again so much Joydeep.
Dan, I’d suggest taking advantage of Notes’ built-in Signature File functionality. That way it will stay until the user changes it. Here’s a modification to Joydeep’s code that should do what you want:
hr := @NewLine + @NewLine;
choice1 := “Name Address Phone”;
choice2 := “Name E-mail Phone”;
prompt := @Prompt([OKCancelList] : [NoSort] ; “title” ; “prompt” ; “” ; choice1 : choice2); REM “give the user choices for signature”;
choice := hr + @ReplaceSubstring(prompt ; " " ; @NewLine); REM “add some blank lines and replace tags with hard returns”;
@SetProfileField(“CalendarProfile” ; “Signature” ; choice); REM “set the signature field to the user’s choice”;
@SetProfileField(“CalendarProfile” ; “EnableSignature” ; “1”); REM “enables the signature for each e-mail”;
@Command([EditGotoField];“Body”);
@Command([EditBottom]);
@Command([EditInsertText] ; choice)
This code is basically automating the process of going to Tools → Preferences → Mail → Signature and giving the user a choice of pre-defined signatures. The only drawback to my code is that it inserts two signatures when a new one is selected. There are ways around this (e.g., @Command([EditSelectAll]) ; @Command([EditClear]) or putting the button somewhere besides the memo form). You could even get more sophisticated than that, if you want.
Anyway, hope this helps. Let me know if you need more detail, and welcome to Notes development.
Thank you for the help and the warm welcome into Notes development. I have been a Lotus Domino Admin for 7 years and feel the need to learn more of the unknown world of scripting. Again thanks everyone for your help. This gets me started on the right foot.