Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In Outlook VBA, how can I change the subject so it changes the subject in the Explorer Pane?

Tags:

vba

outlook

When I receive an email, I'm manipulating the subject line so it is more readable and "conversations" generated by a certain auto-emailer actually contain all of the thread.

I'm able to change the subject in the email view pane, but the subject remains the same in the explorer pane. How can I force the subject to change in the Explorer Pane? Do I have to copy the email and delete the old one? If so, I know that the email date will change. How can I change the email date back to the original date prior to the move? I'm using Outlook 2007.

like image 497
Ross Rogers Avatar asked Dec 29 '25 02:12

Ross Rogers


2 Answers

A bit late, but 2 things: Conversation Topic...

  1. can't be changed in Outlook's Object Model (VBA/VSTO)
  2. can be changed by using Outlook Redemption.

This forum thread has some sample code and instructions at the bottom.

like image 104
Todd Main Avatar answered Dec 31 '25 18:12

Todd Main


Presumably you've already written the code which gets you a reference to a MailItem object.

You can set the MailItem's Subject property to what ever you like and then call it's Save() method. This should achieve what you desire regarding the mail's subject.

However, doing this also updates the mail's ReceivedTime property. This is a read only property so you can't set it back to the previous timestamp. Unfortunately, there may be no way to do so.

like image 25
Adam Ralph Avatar answered Dec 31 '25 16:12

Adam Ralph