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
946 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 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

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 Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…

717 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