T
Taliesin
I'm using this function to send an email from excel, is their any way to
change the From details so that I can use the department e-mail rather than
my personal one?
Function SendIt(FromEmail, ToEmail, ToCC, ToBCC, ToSubject, ToBody,
ToAttachment)
Set out = CreateObject("Outlook.Application")
Set mapi = out.GetNameSpace("MAPI")
Set email = out.CreateItem(0)
email.Recipients.Add (ToEmail)
email.Subject = ToSubject
email.Body = ToBody
email.Send
Set outlook = Nothing
Set mapi = Nothing
End Function
change the From details so that I can use the department e-mail rather than
my personal one?
Function SendIt(FromEmail, ToEmail, ToCC, ToBCC, ToSubject, ToBody,
ToAttachment)
Set out = CreateObject("Outlook.Application")
Set mapi = out.GetNameSpace("MAPI")
Set email = out.CreateItem(0)
email.Recipients.Add (ToEmail)
email.Subject = ToSubject
email.Body = ToBody
email.Send
Set outlook = Nothing
Set mapi = Nothing
End Function