An Outlook Visual Basic for Applications (VBA) macro can use this event procedure to initialize itself when Outlook starts.
Example
This Microsoft Outlook Visual Basic for Applications 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
1. Launch Outlook.
2. Set your security to Medium or Low (sounds like you did.)
3. Press Alt + F11 on your keyboard
4. If you do not see a module when the Visual Basic editor launches:
*Expand the folder labeled Microsoft Outlook Objects in the Project Explorer Window.
*Double click ThisOutlookSession
5. If the module is blank:
*click the Object dropdown at the top of the module window (it reads General)
*Select Application
*Select Startup from the Procedure dropdown (it reads Item Send)
You should now have a code window like this:
CODE
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
End Sub
_____________________________________________________________________
Private Sub Application_Startup()
End Sub
Write your code in the Application_Startup() routine.
No hay comentarios.:
Publicar un comentario