Hallo,
ich möchte bei ein Makro erstellen, welches eine Antwort Mail generiert und automatisch dem Empfänger der Mail schreibt "Guten Tag Herr XX"
Hier mein bisheriger Code:
Sub Antworten()
Dim olInspector As Outlook.Inspector
Dim olDocument
Dim olSelection
Dim strAtt As String
Dim strEmpfaenger As String
Dim myRecipient As String
Dim oItem As MailItem
Dim oMail
Set oItem = GetCurrentItem()
'strEmpfaenger = Left$(oItem.SenderName, InStr(1, oItem.SenderName, ", ") - 1)
Set oMail = oItem.Reply
oMail.Display
Set myRecipient = oItem.Reply.recipients.Item(1).AddressEntry.GetExchangeUser.FirstName
strAtt = "Guten Tag "
Set olInspector = Application.ActiveInspector()
Set olDocument = olInspector.WordEditor
Set olSelection = olDocument.Application.Selection
olSelection.InsertBefore strAtt & myRecipient
Set oMail = Nothing
End Sub
Es funktioniert alles bis auf das auslesen aus dem Exchange.
Kann mir bitte jmd dabei helfen.
Danke und LG
|