如果日历显示我“不在办公室”,是否可以在 Outlook 中创建标准自动回复?
我“不在办公室”的时间可能只有几个小时,因此消息必须自动指定时间段?
谢谢回复。
答案1
Outlook 不会直接执行此操作,但您可以使用宏执行此操作。
OOF(外出办公)自动化是一种基于 VBScript 的自动化功能,当相应用户输入了“外出”约会时,会自动打开 OOF 助手,当不再有“外出”约会时,会自动关闭 OOF 助手。
这可以通过使用任务计划程序从外部利用 CDO 来实现,例如全部 30 分钟。CDOLive 上还有一个内部解决方案。但是,我在实施它时遇到了 MAPI 问题,因为我的 Outlook OOF 消息突然与脚本中修改的消息不同步。
'TO CONFIGURE: Change "ServerName" to the name of your Exchange Server
Const sServerName = "OEBFASRV02"
'TO CONFIGURE: Change "MailboxName" to the name
'of an administrative mailbox on the server specified above
Dim sProfileInfo ' the MAPI logon profile
sProfileInfo = sServerName & vbLf & "Administrator"
'TO CONFIGURE: Change placeholders and
'infixes to reflect your used languages
'(2 at most, if more are needed then change the code yourself...)
Const placeHolderLang1 = "<Datum>"
Const placeHolderLang2 = "<Date>"
Const infixFrom1 = "von "
Const infixFrom2 = "from "
Const infixTo1 = " bis "
Const infixTo2 = " to "
Const infixOn1 = "am "
Const infixOn2 = "on "
'TO CONFIGURE: Send Mails to these people in case of error.
Const ErrMailDistributionList = "rkapl"
日志文件
Log.vbs is a separately usable, simple Logger class. It can be used in other scripts as follows:
Set WshShell = WScript.CreateObject("WScript.Shell")
ExecuteGlobal CreateObject(_
"Scripting.FileSystemObject").OpenTextFile("Log.vbs", 1).ReadAll
' PathToLogFolder.. (default = defaultLogPath in Log.vbs)
' NameOfLogFile.. (default = scriptname)
' maxLevelToBeLogged.. 0 = ERROR, _
' 1 = WARN, 2 = INFO, 3 = DEBUG (default)
' CommaSeparatedErrMailDistributionListString...
' e.g. "admin1, admin2, admin3" (default = defaultMailRecipients in Log.vbs)
' ErrMailSender.. (default = defaultMailSender in Log.vbs)
' ErrMailSubject.. (default = defaultMailSubject in Log.vbs)
Set theLogger = new_Logger(Array(PathToLogFolder,NameOfLogFile,_
maxLevelToBeLogged,CommaSeparatedErrMailDistributionListString, _
ErrMailSender,ErrMailSubject))
theLogger.LogInfo "Info Message"
theLogger.LogWarn "Warning Message"
theLogger.LogError "Error Message"
theLogger.LogStream (WshShell.Exec object)
'logs stderr output of Exec object as
'LogError messages, all other are logged as LogInfo
theLogger.LogFatal "Fatal Message (stops the script)"
不过使用之前还需要进行一些配置:
'TO CONFIGURE: Send Mails to these default
'people in case of error (if not set by using script).
Const defaultMailRecipients = "rkapl,mkovacs,gnebenfuehr,mhoessl,gschrenk"
'TO CONFIGURE: The default sender of the error mails
Const defaultMailSender = "[email protected]"
'TO CONFIGURE: The default subject of error mails
Const defaultMailSubject = "Process Error"
'TO CONFIGURE: The file, where internal errors are logged
Const internalLogFile = _
"\\oebfasrv01\marktdaten\Logs\Log.vbs.internalErrs.log"
'TO CONFIGURE: The folder, where log files are being put
Const defaultLogPath = "\\oebfasrv01\marktdaten\Logs"