troubleshooting Question

How do I nominate sender email in following code

Avatar of Rob4077
Rob4077Flag for Australia asked on
Outlook
5 Comments1 Solution237 ViewsLast Modified:
I am using the following partial code to reply to some emails I receive. What I want to do is have the sender set to "noreply@mydomain.com". Is that possible?

    Dim olkMsg As Outlook.MailItem
    Dim olkRpl As Outlook.MailItem
   
    Set olkMsg = Application.ActiveExplorer.Selection(1)
    Set olkRpl = olkMsg.Reply
   
    With olkRpl
        Select Case olkRpl.BodyFormat
            Case olFormatHTML
                olkRpl.HTMLBody = REPLY_HTML & olkRpl.HTMLBody
            Case Else
                olkRpl.Body = REPLY_TEXT & olkRpl.Body
        End Select
        olkRpl.Attachments.Add sAttach
       
        olkRpl.Send
'        olkMsg.Move Session.GetDefaultFolder(olFolderInbox).Folders("Deleted Items")
        olkMsg.Delete
    End With
       
    Set olkMsg = Nothing
    Set olkRpl = Nothing
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 5 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros