Adding a Bcc mailaddress when creating a new mail

R

Ralf Ebeling

Hi,

I'm somewhat new to developing an OL-addin with VB2005.

I'm trying to populate the Bcc field with a predefined mail address
before the user hits the send button. So the user has the chance to
remove the Bcc address for some mails.

I've added a NewInspector handler and some code to determine when to
add the Bcc address. This works so far, but at least the BCC address
isn't shown in the Bcc field.

If I open and just close the address book the Bcc field will be
populated with the Bcc address already set in the NewInspector handler.

It also makes no difference which method of adding the Bcc address I
use:

Method 1 (afaik the recommend way):
oRecip = Inspector.CurrentItem.Recipients.Add(_sAlwaysBcc)
oRecip.Type = Outlook.OlMailRecipientType.olBCC

Method 2:
Inspector.CurrentItem.BCC = _sAlwaysBcc

Any hints or ideas?

Ralf

BTW: How can I programmatically enable/view the Bcc button and field?
 
R

Ralf Ebeling

Ralf said:
I'm trying to populate the Bcc field with a predefined mail address
before the user hits the send button. So the user has the chance to
remove the Bcc address for some mails.

Just found a solution myself...
I've added a NewInspector handler and some code to determine when to
add the Bcc address. This works so far, but at least the BCC address
isn't shown in the Bcc field.

Using the Inspector.Activate handler does the job.
Method 1 (afaik the recommend way):
oRecip = Inspector.CurrentItem.Recipients.Add(_sAlwaysBcc)
oRecip.Type = Outlook.OlMailRecipientType.olBCC

Method 2:
Inspector.CurrentItem.BCC = _sAlwaysBcc

But it only works with method 2. With method 1 the Bcc address is placed
into the To field.
BTW: How can I programmatically enable/view the Bcc button and field?

Anyway - any hints regarding this issue?

Ralf
 

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