M
mac7attack
Hello all,
Is there a VBA property for a mailitem to change the Send As field? I
would like for the email to come from my team's group mailbox and not
the user who is running the script. My test code as follows.
The SenderEmailAddress property returns a Read-only run-time error.
Sub TestEmail()
Dim position As Long
Dim OLobj As Object
Dim Mailobj As Object
Dim BodyStr As String
Dim SectStr As String
Set OLobj = CreateObject("Outlook.Application")
Set Mailobj = OLobj.CreateItem(olMailItem)
With Mailobj
'.Senderemailaddress = "(e-mail address removed)"
.To = "(e-mail address removed)
.Subject = "Testing VBA"
.Body = "Testing"
.Send
End With
Set Mailobj = Nothing
Set OLobj = Nothing
End Sub
Thanks in advanced,
Matt
Is there a VBA property for a mailitem to change the Send As field? I
would like for the email to come from my team's group mailbox and not
the user who is running the script. My test code as follows.
The SenderEmailAddress property returns a Read-only run-time error.
Sub TestEmail()
Dim position As Long
Dim OLobj As Object
Dim Mailobj As Object
Dim BodyStr As String
Dim SectStr As String
Set OLobj = CreateObject("Outlook.Application")
Set Mailobj = OLobj.CreateItem(olMailItem)
With Mailobj
'.Senderemailaddress = "(e-mail address removed)"
.To = "(e-mail address removed)
.Subject = "Testing VBA"
.Body = "Testing"
.Send
End With
Set Mailobj = Nothing
Set OLobj = Nothing
End Sub
Thanks in advanced,
Matt