Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

From VB Create Recipients as "BCC" not "To" 1

Status
Not open for further replies.

redgate

Programmer
Oct 15, 2001
29
GB
Hi All

The code below works and creates an email with all my recipients in the "To" area of the message.

How can I write these email addresses to the "BCC" area rather.
---
Set golApp = New Outlook.Application
Set objNewMail = golApp.CreateItem(olMailItem)
With objNewMail

Dim strCheck As String
For Each obj In astrRecip
strCheck = obj
If (strCheck <> &quot;&quot;) Then
.Recipients.Add obj
End If
Next obj

.Subject = strSubject
.Body = strMessage

For Each obj In astrAttachments
.Attachments.Add obj
Next obj

If (blnSave = True) Then
.Save
Else
.Send
End If
End With
---
Where astrRecip and astrAttachments are arrays I pass.


Thanks in advance
 
You should set the Recipient Type property to olBCC
 
Thank you

It took me a while but I got it right. For reference here is the code I changed.

For Each obj In astrRecip
strCheck = obj
If (strCheck <> &quot;&quot;) Then
.Recipients.Add(obj).Type = olBCC
End If
Next obj
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top