Lotus Script @mailsend include docLINKS
Lotus Script @mailsend include docLINKS
(OP)
Is this possible: I have created a view that shows all over due items. I would like to select those overdue items, then email the doclinks to the dept Manager (ea doclink a different doc). I have already completed this for a single doclink, but i want to send many doclink in one email.
I plan to use and action button with Lotus Script. Does any one have a working script that performs this function or is it even possible?
Thank for the help
Leo
I plan to use and action button with Lotus Script. Does any one have a working script that performs this function or is it even possible?
Thank for the help
Leo
RE: Lotus Script @mailsend include docLINKS
Why don't you try that ?
If that is not enough, then look up this code :
dim session as new notessession
dim db as notesdatabase
dim view as notesview
dim maildoc as notesdocument
dim doc as notesdocument
dim olddoc as notesdocument
dim rtitem as notesrichtextitem
set db = session.currentdatabase
set maildoc = db.createdocument
maildoc.form = "Memo"
maildoc.sendto = mgr_name
set rtitem = new notesrichtextitem(maildoc,"body")
set view = db.getview("viewname")
set doc = view.getfirstdocument
do while not (doc is nothing)
call rtitem.appenddoclink(doc,"subject")
set olddoc = doc
set doc = view.getnextdocument(olddoc)
delete olddoc
loop
call maildoc.send(false,recipient)
Of course, the above code is not complete. You'll need to get the manager name from somewhere (please do not hard-code it, use a Profile document or something). You'll also need to dress up the body field and provide a subject for the memo, and no doubt include a dozen other things.
But it is a start, and should work as is.
Have fun !