Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Lotus Script @mailsend include docLINKS

Status
Not open for further replies.

92Turbo

IS-IT--Management
Mar 18, 2003
5
0
0
US
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



 
What you are trying to do closely ressembles the Newsletter function (simple action).
Why don't you try that ?
If that is not enough, then look up this code :

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 !
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top