grohm
04-18-2007, 03:07 AM
Hi Guys!
In the code below everythings functions, except if i want to put mor than one recipient (with the array type). I'm sure its only a small thing....
Anyone knows what's wrong?
Sub Button2_Click()
Dim message As Object, OutApp As Object
Set OutApp = CreateObject("Outlook.Application")
Dim AWS As String
'active sheet gets sent by email
AWS = ThisWorkbook.FullName
Set message= OutApp.CreateItem(0)
With message
.to = Array("xxx@xxx.com", "yyy@yyy.com")
.Subject = "A new engagement is ready for processing! " & Date & Time
.attachments.Add AWS
.Body = "Hi SWISSO. Please process this engagement."
'mail gets displayed
.Display
'mail goes into sent items
'Mail.Send
End With
'Outlook schliessen
OutApp.Quit
Set OutApp = Nothing
Set Nachricht = Nothing
End Sub
thanks to you.
Greetz
Ben
In the code below everythings functions, except if i want to put mor than one recipient (with the array type). I'm sure its only a small thing....
Anyone knows what's wrong?
Sub Button2_Click()
Dim message As Object, OutApp As Object
Set OutApp = CreateObject("Outlook.Application")
Dim AWS As String
'active sheet gets sent by email
AWS = ThisWorkbook.FullName
Set message= OutApp.CreateItem(0)
With message
.to = Array("xxx@xxx.com", "yyy@yyy.com")
.Subject = "A new engagement is ready for processing! " & Date & Time
.attachments.Add AWS
.Body = "Hi SWISSO. Please process this engagement."
'mail gets displayed
.Display
'mail goes into sent items
'Mail.Send
End With
'Outlook schliessen
OutApp.Quit
Set OutApp = Nothing
Set Nachricht = Nothing
End Sub
thanks to you.
Greetz
Ben