How to set CC @ Outlook Redemption

L

Luk

can anyone post me a sample code, how to use the Outlook Redemption CC
& BCC ?
when i try .cc ="(e-mail address removed)" or .bcc = "(e-mail address removed)" then i get an error
"read only"

can anyone help me?

tanks in advance!

GreetZ, Luk
 
L

Luk

The Code is:

Imports Microsoft.Office.Interop.Outlook
Imports Redemption

Class Form1
Dim outApp As Microsoft.Office.Interop.Outlook.Application
Dim outMail As Microsoft.Office.Interop.Outlook.MailItem
Dim safMail As SafeMailItem

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click

outApp = New Microsoft.Office.Interop.Outlook.Application
outMail = outApp.CreateItem(OlItemType.olMailItem)
safMail = New SafeMailItem
safMail.Item = outMail

With safMail
..Recipients.Add("(e-mail address removed)")
..Cc = "(e-mail address removed)" <- JUST READONLY ???
..Bcc = "(e-mail address removed)" <- JUST READONLY ???
..Subject = "subject"
..Body = "something"

End Sub
End Class
 
K

Ken Slovak - [MVP - Outlook]

You'd be better off posting programming questions to a programming
newsgroup.

If you look in the Object Browser you'll see that Bcc and Cc are indeed
read-only.

You can either use the SafeRecipients.AddEx method and specify the recipient
type in that call or get the created recipient as a SafeRecipient object and
set SafeRecipient.Type. The enumeration members you want to use are either
olBCC or olCC. For a To address the setting would be olTo, although that's
the default so it doesn't need to be used.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top