Hi guys,
Just wondering if I could please have some assistance tweaking a bit of code I found here... http://www.vbaexpress.com/forum/show...il-and-Forward
The intent is to be able to select a bunch of emails (in inbox) and insert a prefix into the subject line.
... is what I've got so far. It works, but only on 1 of the selected emails. Set olMsg = ActiveExplorer.Selection.Item(1) is the line that I think I need to change, but I'm afraid I don't know what to change it to (or if there is a better way to achieve my goal?).Sub Test() Dim olMsg As MailItem On Error Resume Next Set olMsg = ActiveExplorer.Selection.Item(1) Dim Subject As String Dim Subjectn As String Subject = olMsg.Subject Subjectn = "3322 - " + Subject olMsg.Subject = Subjectn lbl_Exit: Set olMsg = Nothing Exit Sub End Sub
Thanks a lot for any help.