Updating message subject

Add-in Express™ Support Service
That's what is more important than anything else

Updating message subject
 
Dale Lybarger




Posts: 8
Joined: 2007-07-17
After extracting the needed information from a message in my application, I need to update the subject line to show that the message was uploaded. For the most part this works fine. However, the list in Outlook does not seem to be updating as it should without having to click onto another message.

I was wondering if you could suggest any way to get the list in Outlook to refresh.

The code I use for this is below:

'Disable Outlook security messages
SecurityManager1.DisableOOMWarnings = True

'Get information from the selected message
Dim myOutlook As Outlook.Application = New Outlook.Application
myOutlook.ActiveExplorer()
Dim myExp As Microsoft.Office.Interop.Outlook.Explorer = myOutlook.ActiveExplorer()
Dim myMailItem As Microsoft.Office.Interop.Outlook.MailItem = CType(myExp.Selection.Item(msgNumber), Microsoft.Office.Interop.Outlook.MailItem)
Dim txtSubject As String = myMailItem.Subject
myMailItem.Subject = txtSubject & " {Filed in " & recNum & "}"

'Enable Outlook security messages
SecurityManager1.DisableOOMWarnings = False
Posted 16 Oct, 2007 10:52:35 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hi Dale.

Do you call the Save method after you change the subject field?
Posted 16 Oct, 2007 11:42:26 Top