|
Reporter
|
VBOffice Reporter is an easy to use tool for data analysis and reporting in Outlook. A single click, for instance, allows you to see the number of hours planned for meetings the next month. |
With this macro you can edit the subject of an email without having to open it.
Public Sub EditSubject()
Dim obj As Object
Dim Sel As Outlook.Selection
Dim DoSave As Boolean
Dim NewSubject As String
If TypeOf Application.ActiveWindow Is Outlook.Inspector Then
Set obj = Application.ActiveInspector.CurrentItem
Else
Set Sel = Application.ActiveExplorer.Selection
If Sel.Count Then
Set obj = Sel(1)
DoSave = True
End If
End If
If Not obj Is Nothing Then
NewSubject = InputBox("New subject:", , obj.Subject)
If NewSubject <> "" Then
obj.Subject = NewSubject
If DoSave Then
obj.Save
End If
End If
End If
End Sub