Peter Berlin
Member
- Outlook version
- Outlook 2013 64 bit
- Email Account
- POP3
Hello. I am trying to do the following. Run a macro in Excel which will attach a file in Outlook (Office 2013) and save in the draft folder of a shared department folder. I will then go to the shared department Outlook account, review the email and click send. I need the email when received by the participant, that the email was sent by "the shared department email account" and not my work email account. I have the current script working but the draft always shows up in my work email account. I have the shared department account setup on my pc and is working properly. Any assistance is greatly appreciated !!
--------------------------------------------------------------------------------------------------------------------
Dim OutApp As Object
Dim OutMail As Object
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
On Error Resume Next
With OutMail
.To = dis_contacts
.CC = cust_contacts
.BCC = ""
.Subject = "Agreement #" & Temp & " PpForm (" & strDistrict & " - " & expr_date & ")" & " Distributor: " & strDistributor & " Customer: " & cust_name
Dim sMsgBody As String
sMsgBody = "Attached is the .................." & vbCr & vbCr
sMsgBody = sMsgBody & "If you need further assistance, please contact " & vbCr
sMsgBody = sMsgBody & "Please do not use the reply function." & vbCr
.body = sMsgBody
.Attachments.Add (dbfile)
.Display
.Save
.Close olPromtForSave
End With
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing
--------------------------------------------------------------------------------------------------------------------
Dim OutApp As Object
Dim OutMail As Object
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
On Error Resume Next
With OutMail
.To = dis_contacts
.CC = cust_contacts
.BCC = ""
.Subject = "Agreement #" & Temp & " PpForm (" & strDistrict & " - " & expr_date & ")" & " Distributor: " & strDistributor & " Customer: " & cust_name
Dim sMsgBody As String
sMsgBody = "Attached is the .................." & vbCr & vbCr
sMsgBody = sMsgBody & "If you need further assistance, please contact " & vbCr
sMsgBody = sMsgBody & "Please do not use the reply function." & vbCr
.body = sMsgBody
.Attachments.Add (dbfile)
.Display
.Save
.Close olPromtForSave
End With
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing