Sending email from a macro to a cc


Posted by Becky on September 27, 2001 11:20 AM

I have a macro set up to send an email through Lotus Notes when it is activated in excel. It works well, but now I am wondering if anyone knows the command to also send a copy to a cc. ("SendTo" works for the "To" field)

Thanks in advance!
Becky

Posted by Jason on September 27, 2001 12:38 PM

Becky,
I believe under the sendmail method it does not let you do a CC. If you would do me a favor and post the macro I would like to compare it to mind. We recently changed to Lotus Notes and I'm having trouble with my email macro. Keeps trying to use Microsoft Outlook or it hangs up in Lotus Notes. thanks.

Posted by Becky on September 27, 2001 12:50 PM

Jason,
Here is the code - the other option that I have it to send it to two different people in the "to" box (instead of cc), but I haven't been able to get that to work either. I am new to writing macros & would appreciate any help you can give me.

Thanks!
Becky

Sub Mail()
Dim Data As Variant
Dim s As Object
Dim db As Object
Dim doc As Object
Dim r As Integer, x As Double
r = 38
Set s = CreateObject("Notes.NotesSession")
Set db = s.GetDatabase(" ", "mail\username.nsf")
Set doc = db.createdocument()
doc.form = "Memo"
doc.sendto = "becky.sonnentag@clarica.com,"
doc.Subject = "New Trade Ticket Purchase"
doc.body = "Trade ticket number " & Cells(r, 5) & " is ready for allocation" & ". " & " " & "(" & Cells(3, 5) & " " & Cells(3, 17) & ")"
Call doc.send(False)
Set nSession = Nothing
End Sub



Posted by Jason on September 28, 2001 8:50 AM

Becky,
Try inserting this line after sendto

This worked when I ran it on PC. Hopefully, it will work for you. The macro that you sent to me helped out but I really need to send the Excel workbook as an attachment in Lotus notes. Please let me know if you can help. thanks.