diddy0815
Goto Top

Nummerierung in E-Mailbetreff statt AW

Hallo,

Bei einem Geschäftspartner ist mir aufgefallen, sobald er auf ein E-Mail antwortet steht nicht im Betreff z. B.: AW: Ihre Anfrage sondern Re: Ihre Anfrage. Das geniale ist das bei längerer Konversation, dass die Antwort von ihm nummeriert wird. Also statt dem AW:AW:AW:Ihre Anfrage ein Re-3:Ihre Anfrage

Das macht die Sache übersichtlicher. Er realisiert das mit Tobit David.
Ich habe Outlook 2016 mit einem Exchange Server.

Kann man das bei mir umsetzen?

Content-Key: 482507

Url: https://administrator.de/contentid/482507

Printed on: April 19, 2024 at 08:04 o'clock

Member: Lochkartenstanzer
Lochkartenstanzer Aug 07, 2019 updated at 05:12:51 (UTC)
Goto Top
Zitat von @Diddy0815:

Kann man das bei mir umsetzen?

Ja.

Du kannst zu David migrieren oder das Tobit Infocenter als Mailclient nutzen. face-smile

lks

PS: Manchmal reicht es, einfach RE: und FW: statt AW: und WE: zu nutzen.
Mitglied: 140447
140447 Aug 07, 2019 at 05:52:49 (UTC)
Goto Top
Kann man das bei mir umsetzen?
Mit etwas VBA kein großes Problem.
Member: fisi-pjm
fisi-pjm Aug 07, 2019 at 06:32:51 (UTC)
Goto Top
Zitat von @Lochkartenstanzer:

Zitat von @Diddy0815:

Kann man das bei mir umsetzen?

Ja.

Du kannst zu David migrieren oder das Tobit Infocenter als Mailclient nutzen. face-smile


Das kann ich beim besten Willen keinem empfehlen, der auch nur minimal mit externen Zugriffen und anderen Mailclients arbeitet.
Member: Lochkartenstanzer
Lochkartenstanzer Aug 07, 2019 updated at 07:14:35 (UTC)
Goto Top
Zitat von @fisi-pjm:

Zitat von @Lochkartenstanzer:

Zitat von @Diddy0815:

Kann man das bei mir umsetzen?

Ja.

Du kannst zu David migrieren oder das Tobit Infocenter als Mailclient nutzen. face-smile


Das kann ich beim besten Willen keinem empfehlen, der auch nur minimal mit externen Zugriffen und anderen Mailclients arbeitet.

Naja, am smiliey sollte zu erkennen sein, daß das zwar eine mögliche, aber keine ernstgemeinte Empfehlung war.

Aber David kathegorisch abzulehnen ist unangebracht, weil es auch Umgebungen gibt, in denen es deutlich besser als andere Lösungen ist.

lks
Member: emeriks
emeriks Aug 07, 2019 at 07:13:25 (UTC)
Goto Top
@lks
Ja, ja, in manchen Kathedralen wird so einiges kategorisch abgelehnt .... face-wink
Member: Lochkartenstanzer
Lochkartenstanzer Aug 07, 2019 at 07:15:32 (UTC)
Goto Top
Zitat von @emeriks:

@lks
Ja, ja, in manchen Kathedralen wird so einiges kategorisch abgelehnt .... face-wink

Mist, schon wieder. Ich muß doch irgendwann auf intravenöswe statt oraler Koffeeinzufuhr umstellen. face-smile

lks
Member: emeriks
emeriks Aug 07, 2019 at 07:18:55 (UTC)
Goto Top
Zitat von @Lochkartenstanzer:
Mist, schon wieder. Ich muß doch irgendwann auf intravenöswe statt oraler Koffeeinzufuhr umstellen. face-smile
Ja, aber nur Irish Coffee bitte, ohne Zucker und Sahne ...
Member: fisi-pjm
fisi-pjm Aug 07, 2019 at 07:40:23 (UTC)
Goto Top
Zitat von @Lochkartenstanzer:
Aber David kathegorisch abzulehnen ist unangebracht, weil es auch Umgebungen gibt, in denen es deutlich besser als andere Lösungen ist.

War ja nicht Kategorisch abgelehnt. Habs ja eingegrenzt und ihm damit eine Daseinsberechtigung gelassen face-smile
Member: colinardo
Solution colinardo Aug 07, 2019 updated at 09:03:27 (UTC)
Goto Top
Servus @Diddy0815,
hab dir das mal schnell in VBA für Outlook zusammengescriptet. Wurde hier unter Outlook 2019 getestet, sollte aber auch in älteren Versionen und Office 365 laufen. Der Code supported auch sogenannte InlineResponses bei denen ohne Extra Inspector auf Mails geantwortet wird.

back-to-top1. Folgenden Code im VBA-Editor von Outlook im Abschnitt ThisOutlookSession bzw. DieseOutlookSitzung einfügen
' Exlorers object in current application  
Dim WithEvents allExplorers As Explorers
' collection which will hold all explorers  
Dim ExplorerCollection As New Collection

' when new explorer is created  
Private Sub allExplorers_NewExplorer(ByVal Explorer As Explorer)
    On Error Resume Next
    AddExplorerEvents Explorer
End Sub
' on outlook startup  
Private Sub Application_Startup()
    On Error Resume Next
    AddExplorerEvents ActiveExplorer
    Set allExplorers = Application.Explorers
End Sub

Private Sub AddExplorerEvents(ByVal exp As Explorer)
    ' create event class  
    Dim c As New newExplorerClass
    ' and add Explorer Object to its public variable  
    Set c.actExplorer = exp
    ' add explorer to collection  
    ExplorerCollection.Add c
End Sub
back-to-top2. Dann ein neues Klassenmodul über Einfügen > Klassenmodul erstellen. In der Eigenschaften-Pane der Klasse benennt man die Klasse um in newExplorerClass und stellt sicher das die Klasse unter "Instancing" auf Private gestellt ist.

f8a40243a8c0abecb67333cb7734c9ba
back-to-top3. In die neu erstellte Klasse fügt man nun folgenden Code ein:
' Explorer Object to work on  
Public WithEvents actExplorer As Explorer
' current Message object working on  
Dim WithEvents actMessage As MailItem

' Function to reformat subject for reply  
Private Function ReformatResponseSubject(ByVal mail As MailItem) As Variant
    Dim strNewSubject As String, regex As Object, cnt As Integer, matches As Object, match As Object
    Set regex = CreateObject("vbscript.regexp")  
    regex.Global = True: regex.IgnoreCase = True: regex.MultiLine = False
    ' Pattern for reply strings  
    regex.Pattern = "(AW|RE|RE-(\d+)):"  
    ' execute regex  
    Set matches = regex.Execute(mail.Subject)
    ' if reply found  
    If matches.Count > 0 Then
        ' default count to number of reply strings found + 1  
        cnt = matches.Count + 1
        ' find RE-[::digit::] pattern in that case use digits as counter + 1  
        For Each match In matches
            If Not IsEmpty(matches(0).submatches(1)) Then
                cnt = CInt(match.submatches(1)) + 1
                Exit For
            End If
        Next
        ' replace reply strings with empty string and add new prefix  
        strNewSubject = "RE-" & cnt & ":" & regex.Replace(mail.Subject, "")  
        ' return new subject  
        ReformatResponseSubject = strNewSubject
    Else ' no reply found  
        ReformatResponseSubject = vbNull
    End If
    Set regex = Nothing
    Set matches = Nothing
End Function

' Response is Inline-Response  
Private Sub actExplorer_InlineResponse(ByVal Item As Object)
    Dim result As Variant
    result = ReformatResponseSubject(actMessage)
    If result <> vbNull Then
        Item.Subject = result
    End If
End Sub
' keep track of current item  
Private Sub actExplorer_SelectionChange()
    If Not actExplorer Is Nothing Then
        With actExplorer
            If .Selection.Count > 0 Then
                If .Selection(1).Class = olMail Then
                    Set actMessage = .Selection(1)
                End If
            End If
        End With
    End If
End Sub

' if item is replied to  
Private Sub actMessage_Reply(ByVal Response As Object, Cancel As Boolean)
    On Error Resume Next
    Dim res As MailItem, strSalutation As String, actInspector As Inspector, result As Variant
    Set actInspector = ActiveInspector
    ' check if there is an active Inspector (if not it's an inline response)  
    If Not actInspector Is Nothing Then
        ' if the item in the activeinspector is not the message replied to it's an inlineresponse, so exit event  
        If actInspector.CurrentItem <> actMessage Then Exit Sub
        ' create response  
        Set res = actMessage.Reply
        With res
            result = ReformatResponseSubject(actMessage)
            If result <> vbNull Then
                res.Subject = result
            End If
            ' Cancel original response  
            Cancel = True
            ' show new response object  
            .Display
        End With
    End If
End Sub

back-to-top4. Nun im Trust-Center von Outlook sicherstellen das Makros ausgeführt werden dürfen (Datei>Optionen>TrustCenter>"Einstellungen für das Trustcenter"). Entweder alle, oder besser man signiert den Code im VBA Editor und lässt nur signierten Code zu.

1b80fe6eb120ca8d2288eb77a4d9f17b

Wenn man das Projekt signieren möchte macht man das im VBA Editor unter Extras >Digitale Signatur. Hat man das Projekt signiert kann man im TrustCenter umstellen auf die 2. Option von oben indem man nur signierten Code zulässt. Dazu muss dann einmalig beim Start von Outlook der Signatur vertraut werden.

back-to-top5. Nun muss Outlook zwingend neu gestartet sonst kann der Code nicht laufen, da die Events erst nach einem Neustart von Outlook aktiv werden.

Viel Spaß damit, wie immer ohne Gewähr auf Leib und Leben.
Grüße Uwe

p.s. Persönliche Anpassungen/Fehlerbehebungen gerne gegen Aufwandsentschädigung per PN