E-mail Module problem

ISBB

Board Regular
Joined
May 2, 2005
Messages
101
I have this e-mail module written that i found by searching around here.. but i am trying to add a second .To recipient however it is not passing it off to the e-mail client. I have tried adding .CC and .BCC to the code as well and neither work. Am i missing something simple?

Code:
Sub RTFBodyX()
Const ForReading = 1, ForWriting = 2, ForAppending = 3
Dim fs, f
Dim RTFBody, strTo
Dim MyItem As Outlook.MailItem
Dim MyApp As New Outlook.Application
DoCmd.OutputTo acOutputQuery, "dncsend", acFormatHTML, "dncsend.htm"
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.OpenTextFile("dncsend.htm", ForReading)
RTFBody = f.ReadAll
'Debug.Print RTFBody
f.Close
Set MyItem = MyApp.CreateItem(olMailItem)
With MyItem
   .To = "void@nams-inc.com; paulk@courtesycall.com"
   .Subject = "Voids & DNC's"
   .HTMLBody = RTFBody
End With
MyItem.Display
End Sub
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
bah.. nevermind.. figured it out... wasnt using the module was using a macro in the form itself, just confused myself having the module code there...
 
Upvote 0

Forum statistics

Threads
1,221,519
Messages
6,160,295
Members
451,636
Latest member
ddweller151

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top