|
Also eigentlich ist meine Frage klar gestellt, aber nochmal:
Sub SetAutomaticReplies(startDate As Date, endDate As Date, replyMessage As String)
Dim oSession As Object
Dim oAccount As Object
Dim oAutoReply As Object
' Create an instance of the Outlook session
Set oSession = CreateObject("Outlook.Application").Session
Set oAccount = oSession.Accounts.Item(1) ' Assumes the first account is the one to set OOF for
' Create an instance of the AutoReply object
Set oAutoReply = oAccount.AutoReply '=> Das hier scheint es wohl gar nicht zu gebe.?
' Set up the auto-reply properties
With oAutoReply
.StartTime = startDate
.EndTime = endDate
.InternalReplyMessage = replyMessage
.ExternalReplyMessage = replyMessage
.Enabled = True
End With
' Save the auto-reply settings
oAutoReply.Save
' Clean up
Set oAutoReply = Nothing
Set oAccount = Nothing
Set oSession = Nothing
End Sub
Wie kann ich nun auf das Autoreply Objekt zugreifen, so dass es funktioniert, bzw. gibt es das allenfalls gar nicht?
|