Application. Startup 事件 (Outlook)Application.Startup event (Outlook)

在 Microsoft Outlook 启动时并且在所有加载项程序加载后发生。Occurs when Microsoft Outlook is starting, but after all add-in programs have been loaded.


expressionexpression. Startup

expression:表示 Application 对象的变量。expression A variable that represents an Application object.


此事件在 Microsoft Visual Basic Scripting Edition (VBScript) 中不可用。This event is not available in Microsoft Visual Basic Scripting Edition (VBScript).

Outlook 宏可以在 Outlook 启动时使用此事件过程初始化自身。An Outlook macro can use this event procedure to initialize itself when Outlook starts.


本 Microsoft Visual Basic for Applications (VBA) 示例在 Outlook 启动时向用户显示一条欢迎消息,并最大化 Outlook 浏览器窗口。This Microsoft Visual Basic for Applications (VBA) example displays a welcome message to the user and maximizes the Outlook explorer window when Outlook starts.

Private Sub Application_Startup() 
 MsgBox "Welcome, " & Application.GetNamespace("MAPI").CurrentUser 
 Application.ActiveExplorer.WindowState = olMaximized 
End Sub

另请参阅See also

Application 对象Application Object

支持和反馈Support and feedback

有关于 Office VBA 或本文档的疑问或反馈?Have questions or feedback about Office VBA or this documentation? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.