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
937 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
Comment Utility
try this

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

~Hemanth
0
 

Author Comment

by:ttennant
Comment Utility

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

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

IBM Notes offer Encryption feature using which the user can secure its NSF emails or entire database easily. In this section we will discuss about the process to Encrypt Incoming and Outgoing Mails in depth.
Article by: Rob
Notes 8.5 Archiving Steps and Tips This article covers setting up a Notes archive, and helps understand some of the menu choices making setting up and maintaining a Notes archive file easier.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

728 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

10 Experts available now in Live!

Get 1:1 Help Now