Closed Thread
Results 1 to 3 of 3

Send New Email W/ Body of Received Email, Then Delete Sent Email

  1. #1
    Registered User
    Join Date
    07-31-2012
    Location
    Houston, Texas
    MS-Off Ver
    Excel 2013
    Posts
    20

    Send New Email W/ Body of Received Email, Then Delete Sent Email

    I use this script below in VB to send my received emails in outlook at work to my personal email. I do it this way so that the messages I send do not include the "FW:" and come with the original subject and message body. I am curious if anyone knows a way that I can have the script automatically delete the sent email after it has been sent, while still keeping the original message received in Outlook. Any help would be appreciated.



    Sub SendNew(Item As Outlook.MailItem)

    Dim objMsg As MailItem
    Set objMsg = Application.CreateItem(olMailItem)

    objMsg.Body = Item.Body
    objMsg.Subject = Item.Subject
    objMsg.Recipients.Add "alias@domain.com"

    objMsg.Send

    End Sub

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 2000/3/7/10/13/16/365
    Posts
    52,004

    Re: Send New Email W/ Body of Received Email, Then Delete Sent Email

    How is this different from here?

    http://www.excelforum.com/outlook-fo...-send-new.html

    Seeing as you have more detail here than in the other thread, I will close the other 1 and you can continue here. But for future reference, please do not post duplicate threads.

    Also...
    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 2000/3/7/10/13/16/365
    Posts
    52,004

    Re: Send New Email W/ Body of Received Email, Then Delete Sent Email

    You could just have added the code tags here, by editing that post, there was no need to create a new thread
    http://www.excelforum.com/outlook-fo...ipt-in-vb.html

    I will close this thread for you, you can continue on the other (3rd) thread

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1