?
Solved

How do I add 2 fields in a doc.CopyTo or doc.SendTo statement when sending an email within lotusscript?

Posted on 2004-08-26
2
Medium Priority
?
951 Views
Last Modified: 2013-12-18
I have a form that sends out email notifications and I want to add mutiple fields to the "CopyTo" assignment.  His a piece of my code:

########################################
Dim session As New NotesSession
Dim db As NotesDatabase
Dim doc As NotesDocument
Dim uiDoc As NotesUIDocument
Dim ws As New NotesUIWorkspace
Set db = session.CurrentDatabase
Set doc = source.Document
Set uiDoc = ws.CurrentDocument

Dim emailDoc As NotesDocument  
Set emailDoc = db.CreateDocument  
emailDoc.Form = "Memo"
emailDoc.Subject = "Travel Approved"

'...Set up body of email...
Dim rtitem As NotesRichTextItem
Set rtitem = emailDoc.CreateRichTextItem("Body")
Call rtitem.AppendText("Hi " + doc.DocAuthor(0) + ", ")
Call rtitem.AddNewLine(1)
Call rtitem.AppendText("   -->  Click on this DocLink to view the request:   ")
Call rtitem.AppendDocLink( uidoc.Document , "Link to Document" )
Call rtitem.AddNewLine(2)
Call rtitem.AppendText("NOTE:  This is an automated reply")

emailDoc.SendTo = doc.DocAuthor
emailDoc.CopyTo = doc.CCperson  '...Here is where I want to also add doc.Approver which contains another email address ...
emailDoc.Send False
###################################

I have tried the following statements without success:

emailDoc.CopyTo = doc.CCperson + doc.Approver
emailDoc.CopyTo = doc.CCperson & doc.Approver

Any help would be greatly appreciated....Thanks.
0
Comment
Question by:ttennant
[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 Comments
 
LVL 24

Accepted Solution

by:
HemanthaKumar earned 400 total points
ID: 11906946
try this

emailDoc.CopyTo = ArrayAppend(doc.CCperson,doc.Approver)

~Hemanth
0
 

Author Comment

by:ttennant
ID: 11907017

Thanks Hermanth....worked like a charm.  I thought this would be an easy one.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

For beginners of Lotus Notes user this is important to know about the types of files and their location supported by IBM Notes. Mostly users are unaware about how many file types are created and what their usages are. This Article is fully dedicated…
This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

765 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