Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Lotus notes @mailsend as lotusscript

Posted on 2012-03-12
5
Medium Priority
?
1,203 Views
Last Modified: 2013-12-18
I have a form with the following fields:-
Form Name: leasetracemail
ltto (text)
ltcc (text)
ltfbcc (text)
ltsubject (text)
ltbody (rich text)
trailer(text)

the rich text field can contain attachments and I am tryinmg to use the @mailsend as follows:
@MailSend(ltto;ltcc;ltbcc;ltsubject;"";ltbody:trailer);

However @mailsend does not work with rich text fileds for attachments.  I beleive that I need to use Lotusscript to do this but am not a Lotussscript programmer.  Can anyone translate the mailsend command (to use on a button) as Lotusscript please?

Thanks
Pete
0
Comment
Question by:peadarmac
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 37712551
First, try to use

      @MailSend(ltto;ltcc;ltbcc;ltsubject;"";"ltbody":"trailer");

The 6th parameter is, according to the help: "The names of one or more fields from the current document that you want included in the mail memo. "
0
 

Author Comment

by:peadarmac
ID: 37713546
Hi sjef_bosman,  the @mailsend works fine if the ltbody field is a simple text field.  The problem is if I make it a rich text field and attach a document it does not work.  Putting the sixth parameter in quotes just send ltbody as a literal string.  Really need to do this with script I reckon.  Thanks.
0
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 37713593
I can confirm that the 6th parameter must be a text-list of field names. But if you say it doesn't work, I believe you ;-)

In LotusScript (assuming that the current document is opened AND is not a new document, i.e. it's been saved to disk):

Dim ws As New NotesUIWorkspace
Dim ns As New NotesSession
Dim db As NotesDatabase
Dim doc As NotesDocument
Dim maildoc As NotesDocument
Set db= ns.CurrentDatabase
Set doc= ws.CurrentDocument.Document
Set maildoc= New NotesDocument(db)
maildoc.Form= "Memo"
maildoc.SendTo= doc.ltto
maildoc.CopyTo= doc.ltcc
maildoc.BlindCopyTo= doc.ltbcc
maildoc.Subject= doc.ltsubject
Call doc.CopyItemToDocument(maildoc, "Body")
Call maildoc.Send(False)
0
 
LVL 4

Accepted Solution

by:
cohalex earned 2000 total points
ID: 37713613
You need to rename your fields on the form to:

ltto (text) -> SendTo (text (multivalue))
ltcc (text) -> CopyTo (text (multivalue))
ltfbcc (text) -> BlindCopyTo (text (multivalue))
ltsubject (text) -> Subject (text)
ltbody (rich text) -> Body (rich text)

If you cant simply rename them, create the new fields as computed and take the values from the original ones.
Body should be renamed though.

On your Send button in LS, you could have:

      Dim ws As New NotesUIWorkspace
      Dim uidoc As NotesUIDocument
      
      Set uidoc = ws.CurrentDocument
      Call uidoc.Send()
0
 

Author Closing Comment

by:peadarmac
ID: 37716473
Exactly what I needed..simple and straightforward..Thx
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For users on the Lotus Notes 8 Standard client, this article provides information on checking the Java Heap size and adjusting it to half of your system RAM in attempt to get the Lotus Notes 8.x Standard client to run faster.  I've had to exercise t…
I thought it will be a good idea to make a post as it will help in case someone else faces these issues. I trust this gives an idea how each entry in Notes.ini can mean a lot for the Domino Server to be functioning properly. This article discusses t…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question