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
939 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
2 Comments
 
LVL 24

Accepted Solution

by:
HemanthaKumar earned 100 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Add a cc field to email code 3 109
Domino Server 2 76
Cannot access mail archive from IBM domino 5 103
Disable some Lotus eMail users for a period of time 4 65
You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
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 Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

813 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now