StartDownloadsServiceSamplesWorkshopsContact DeutschEnglish
 
Samples
General
Outlook®
 
Awarded by
Microsoft since 2005:
mvp logo
VBOffice Info
Visitors1718032
Impressions6468330
Links
Imprint
Privacy Policy
Contact
E-Mail: Reply with a changed subject
Author: Michael BauerHomepage
Date: 19.01.2006Accessed: 23119
  
Description

We are very sorry! This description is not translated yet. Anyway, please try the code as it is self-explanatory.

Public Sub ReplyMail()
  Dim obj As Object
  Dim oReply As Outlook.MailItem
  ' Text, der dem Betreff vorangestellt werden soll
  Const FIX_SUBJECT As String = "Automatische Antwort von x: "

  ' Verweis auf das aktuell geöffnete oder selektierte Element:
  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 If
    End With
    If obj Is Nothing Then
      Exit Sub
    End If
  End Select

  If TypeOf obj Is Outlook.MailItem Then
    Set oReply = obj.Reply
    If InStr(1, oReply.Subject, FIX_SUBJECT, vbTextCompare) = 0 Then
      oReply.Subject = FIX_SUBJECT & oReply.Subject
    End If
    oReply.Display
  End If
End Sub

 
 

ReplyAll alerts you before unintentionally replying all, or if you are a confidential BCC recipient of the ... [more]

 

Access the master category list in the blink of an eye, share your categories in a network, get a reminder service, and ... [more]

 

SAM automatically sets the sender, signature, and folder for sent items, for instance based on the recipient ... [more]

 

OLKeeper reliably prevents users from closing their Outlook window and thus possibly missing reminders or ... [more]