Why dosen't this work?

J

Johan Christensson

Hi.

The code segment below is getting me confuced. Why dosen't it work? When I select a mail in Outlook, and click on the button associated with the sub, the only thing that happens is that the mail get opened, but the subject line is the same.

What am I missing here?

Best regards, Johan Christensson


--------------------------------------------------------------------------------

Private Sub objTagButton_Click(ByVal Ctrl As Office.CommandBarButton, _
CancelDefault As Boolean)

On Error Resume Next

Set objSelMail = objHostApp.ActiveExplorer.Selection(1)
Set objOrigSub = objSelMail.Subject

' Modify the subject line of the message to include the agents user-id
objSelMail.Subject = "This mail is taged " & objOrigSub

' Saves changes to the message
objSelMail.Save

' Displays the message
objSelMail.Display

End Sub

--------------------------------------------------------------------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top