V
Vinod Lewis
Hello All,
I have created a form in excel (leave application). I have a data validation
list, which has departments ie: admin, hr....... and I also have a email
submit button.
I have found one of the code in a previous post. which actually loads the
email envelope with the specified email address in the code.
================================
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
On Error Resume Next
With OutMail
..to = "RecipientAddress"
..CC = "CarbonCopyAddress"
..BCC = "BlindCarbonCopyAddress"
..Subject = "Your subject here"
..Attachments.Add ActiveWorkbook.FullName
'Attaches active workbook
..Display 'Displays the processed email. You
can change this to .Send
End With
On Error GoTo 0
===============================
Anybody has any idea how this can be done. Any help is greatly appreciated.
I need a code that when a user clicks the submit button, it should check the
data validation list and send 1 email to the respective manager and 1 to the
HR.
ie: If i select Admin from the drop down validation list. one mail should go
to admin department (whoevers email address is specified) and other one
should go to the HR department, when i click the submit button.
Thanks in advance.
I have created a form in excel (leave application). I have a data validation
list, which has departments ie: admin, hr....... and I also have a email
submit button.
I have found one of the code in a previous post. which actually loads the
email envelope with the specified email address in the code.
================================
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
On Error Resume Next
With OutMail
..to = "RecipientAddress"
..CC = "CarbonCopyAddress"
..BCC = "BlindCarbonCopyAddress"
..Subject = "Your subject here"
..Attachments.Add ActiveWorkbook.FullName
'Attaches active workbook
..Display 'Displays the processed email. You
can change this to .Send
End With
On Error GoTo 0
===============================
Anybody has any idea how this can be done. Any help is greatly appreciated.
I need a code that when a user clicks the submit button, it should check the
data validation list and send 1 email to the respective manager and 1 to the
HR.
ie: If i select Admin from the drop down validation list. one mail should go
to admin department (whoevers email address is specified) and other one
should go to the HR department, when i click the submit button.
Thanks in advance.