![]() |
|
#5
|
||||
|
||||
|
You probably wouldn't want to do this to every email, but only to selected emails.
As I said in my previous post, I don't use Outlook (and don't really have time to learn it's intricacies), so the following is based on code from: http://www.vboffice.net/sample.html?...9&cmd=showitem Code:
Public Sub ReplyMail()
Dim obj As Object
Dim oReply As Outlook.MailItem
Select Case True
Case TypeOf Application.ActiveWindow Is Outlook.Inspector
Set obj = Application.ActiveInspector.CurrentItem
Case Else
With Application.ActiveExplorer.Selection
If .Count Then Set obj = .Item(1)
End With
If obj Is Nothing Then Exit Sub
End Select
If TypeOf obj Is Outlook.MailItem Then
Set oReply = obj.Reply
With oReply
If Not .Subject Like "*CASE##???###########" Then
.Subject = .Subject & " - CASE" & Format(Now, "DDMMMYYhhmmss") & Format((Len(.Subject) Mod 1000), "000")
End If
.Display
End With
End If
End Sub
If you're interested in Outlook programming, see: http://msdn.microsoft.com/en-us/libr...gInOutlook2010. In addition to it's own examples, that page has a number of useful links, one of which took me to the link mentioned earlier in this post.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Macro help outlook 2010 | seanchad | Outlook | 0 | 06-28-2012 02:49 AM |
Word 2010 Macro
|
jomarie | Office | 1 | 02-19-2012 07:45 PM |
| Mail with macro Excel 2010 | santors71 | Excel Programming | 1 | 12-07-2011 06:34 AM |
| Macro - Microsoft Word 2010 | OfficeHelpSG | Word | 3 | 10-18-2011 11:54 AM |
Run a Macro in Word 2010
|
Joyce301 | Word VBA | 3 | 04-29-2011 03:27 PM |