I'm trying to create a toolbar button that inserts a footer (including some buttons) into the current mail.
As far as I know, theres no way to create and modify buttons directly with Lotus Formula, so I'm trying to copy/paste from another document. I can't use a mail template because I need the text to be inserted in replies.
This is what I have assembled from online examples:
@PostedCommand([FileOpenDatabase]; "SERVER" : "mailbox.nsf" ;
"($All)" ; "" ; 1 ; 1 ) ;
@PostedCommand([OpenDocument] ; "" ; "34884517EED80C33C125A999005301D4") ;
@PostedCommand([EditDocument]) ;
@PostedCommand([EditGotoField] ; "Body" ) ;
@PostedCommand([EditSelectAll]) ;
@PostedCommand([EditCopy]) ;
@PostedCommand([FileCloseWindow]) ;
@PostedCommand([FileCloseWindow]) ;
@PostedCommand([EditPaste])
This works inconsistently, depending on what I am looking at when pressing the button. Sometimes it opens a search box with the actual text of the mail pasted in it. It does seem to close the new mail.
I'm especially confused because many commands don't take any arguments, eg FileCloseWindow. How do I control the "context" of the commands or check for success?
It feels like doing automation with SendKeys - fire off a chain of commands and hope that nothing unexpected happens. Of course, I am a total noob with Lotus Formula, so I may be doing this totally wrong. Any help is appreciated.
"SERVER"
and"mailbox.nsf"
in the first line? I wasted like half-an-hour until finally noticed in the docs that one of those semicolons is not like the others... – Martin