PDA

View Full Version : Solved: Send from group email box?



debauch
10-28-2008, 12:06 PM
We use a group email box in outlook. The automated notifcations I use via VBA are sent using my personal email box. Is it possible to send from the "group box"?

Snippet used to send

With olMail
'.From = "here@groupbox.com" < doesnt work?
.To = iTo
.cc = iCC
.Subject = isubject
'.HTMLBody = SheetToHTML(ThisWorkbook.Sheets(1)) 'turn sheet 1 to HTML
.Body = iBody
'.Display use to test view of output
.Send
End With
Set olMail = Nothing
Set OlApp = Nothing

JP2112
10-30-2008, 05:50 AM
We use a group email box in outlook. The automated notifcations I use via VBA are sent using my personal email box. Is it possible to send from the "group box"?

Snippet used to send

With olMail
'.From = "here@groupbox.com" < doesnt work?
.To = iTo
.cc = iCC
.Subject = isubject
'.HTMLBody = SheetToHTML(ThisWorkbook.Sheets(1)) 'turn sheet 1 to HTML
.Body = iBody
'.Display use to test view of output
.Send
End With
Set olMail = Nothing
Set OlApp = Nothing

Check out the SentOnBehalfOfName Property of the Mail Item.

HTH,
JP

debauch
10-30-2008, 11:29 AM
.....I swear I tried every property BUT that one. Awesome, thanks! (worked like a charm)

JP2112
10-30-2008, 03:35 PM
Glad to hear it worked!

:thumb

--JP