Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 273
Default multiple address in the BCC filed of Outlook

i have the following code set up to e-mail, i want to have multiple addresses
in the BCCfield. how do i do that?

Sub Mail_Sheet_Outlook_Body()
Dim rng As Range
Dim OutApp As Object
Dim OutMail As Object
With Application
.EnableEvents = False
.ScreenUpdating = False
End With

Set rng = Nothing
Set rng = ActiveSheet.UsedRange
'You can also use a sheet name
'Set rng = Sheets("Lead Sheet").UsedRange

Set OutApp = CreateObject("Outlook.Application")
OutApp.Session.Logon
Set OutMail = OutApp.CreateItem(0)

On Error Resume Next
With OutMail
.to = Format(Worksheets("Lead Sheet").Range("D32").Value, "mm-dd")
.CC = Format(Worksheets("Lead Sheet").Range("D33").Value, "mm-dd")
.BCC = Format(Worksheets("Lead Sheet").Range("D34").Value, "mm-dd")
.Subject = Format(Worksheets("Lead Sheet").Range("F9").Value, "mm-dd")
.HTMLBody = Format(Worksheets("Lead Sheet").Range("A1:D35").Select,
Application.CutCopyMode = False, Selection.Copy, "mm-dd")
Application.SendKeys "^v"
.Display
End With
On Error GoTo 0

With Application
.EnableEvents = True
.ScreenUpdating = True
End With

Set OutMail = Nothing
Set OutApp = Nothing
End Sub
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 128
Default multiple address in the BCC filed of Outlook

On Apr 4, 12:05 pm, gary wrote:
i have the following code set up to e-mail, i want to have multiple addresses
in the BCCfield. how do i do that?

Sub Mail_Sheet_Outlook_Body()
Dim rng As Range
Dim OutApp As Object
Dim OutMail As Object
With Application
.EnableEvents = False
.ScreenUpdating = False
End With

Set rng = Nothing
Set rng = ActiveSheet.UsedRange
'You can also use a sheet name
'Set rng = Sheets("Lead Sheet").UsedRange

Set OutApp = CreateObject("Outlook.Application")
OutApp.Session.Logon
Set OutMail = OutApp.CreateItem(0)

On Error Resume Next
With OutMail
.to = Format(Worksheets("Lead Sheet").Range("D32").Value, "mm-dd")
.CC = Format(Worksheets("Lead Sheet").Range("D33").Value, "mm-dd")
.BCC = Format(Worksheets("Lead Sheet").Range("D34").Value, "mm-dd")
.Subject = Format(Worksheets("Lead Sheet").Range("F9").Value, "mm-dd")
.HTMLBody = Format(Worksheets("Lead Sheet").Range("A1:D35").Select,
Application.CutCopyMode = False, Selection.Copy, "mm-dd")
Application.SendKeys "^v"
.Display
End With
On Error GoTo 0

With Application
.EnableEvents = True
.ScreenUpdating = True
End With

Set OutMail = Nothing
Set OutApp = Nothing
End Sub


Hello Gary,

The BCC field is a string. Multiple email address fields are separated
with a semicolon ;

Sincerely,
Leith Ross
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 273
Default multiple address in the BCC filed of Outlook

so, all i would need to do is put a semicolon, then start this line again?
..BCC = Format(Worksheets("Lead Sheet").Range("D34").Value, "mm-dd")

"Leith Ross" wrote:

On Apr 4, 12:05 pm, gary wrote:
i have the following code set up to e-mail, i want to have multiple addresses
in the BCCfield. how do i do that?

Sub Mail_Sheet_Outlook_Body()
Dim rng As Range
Dim OutApp As Object
Dim OutMail As Object
With Application
.EnableEvents = False
.ScreenUpdating = False
End With

Set rng = Nothing
Set rng = ActiveSheet.UsedRange
'You can also use a sheet name
'Set rng = Sheets("Lead Sheet").UsedRange

Set OutApp = CreateObject("Outlook.Application")
OutApp.Session.Logon
Set OutMail = OutApp.CreateItem(0)

On Error Resume Next
With OutMail
.to = Format(Worksheets("Lead Sheet").Range("D32").Value, "mm-dd")
.CC = Format(Worksheets("Lead Sheet").Range("D33").Value, "mm-dd")
.BCC = Format(Worksheets("Lead Sheet").Range("D34").Value, "mm-dd")
.Subject = Format(Worksheets("Lead Sheet").Range("F9").Value, "mm-dd")
.HTMLBody = Format(Worksheets("Lead Sheet").Range("A1:D35").Select,
Application.CutCopyMode = False, Selection.Copy, "mm-dd")
Application.SendKeys "^v"
.Display
End With
On Error GoTo 0

With Application
.EnableEvents = True
.ScreenUpdating = True
End With

Set OutMail = Nothing
Set OutApp = Nothing
End Sub


Hello Gary,

The BCC field is a string. Multiple email address fields are separated
with a semicolon ;

Sincerely,
Leith Ross

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
e-mail address via outlook address book Erik Excel Programming 0 October 17th 06 11:21 PM
USING OUTLOOK FILED ONEXCEL Edy Excel Programming 1 March 5th 06 06:15 AM
Outlook Address Book Allan Excel Discussion (Misc queries) 1 November 19th 05 10:00 PM
How do I import Office address book to Outlook Express address bo. snnorp Excel Discussion (Misc queries) 2 February 22nd 05 11:47 AM
How to insert an address from Outlook 2003 address book ? Dubois Excel Programming 0 September 27th 04 09:26 AM


All times are GMT +1. The time now is 02:40 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"