I want to write a macro for Outlook which is called when I click on X. I want to quit application_Quit () to stop SubRoutine, then reduce it instead I can understand at least, but how do I stop it from leaving it?
end You can tell on the basis of the method signature of Application_Quit ():
Private Sub Application_Quit () End Sub
A cancelable event will look like this:
Private Sub Application_ItemSend (ByVal item as object, cancel as Boolean) End Sub
I searched around, and in a way The trick of the trick, however, if you do not believe in the side-effect, then automatically reduces the Outlook when it launches (found, copy and ref Ted is done):
The trick is to add macros, which automatically reduces Outlook when it is started:
To go to the VBA editor, press Alt -Press F11 Paste this sub in "This Automation Session" section:
Private Sub Application_Startup () SendKeys ("% n") End Sub
< Blockquote> Now it will be reduced after Outlook loads, even when someone tries to close the approach, I still use it to reduce it to the next one.
Private sub application_Quit () call shell ("C: \ Program Files \ Microsoft Office \ OFFICE11 \ relaunchOL.bat" _, vbHide) end sub
C: \ Program Files \ Microsoft Office \ OFFICE11 \ relaunchOL.bat and create these two lines in:
Ping 1.2.3.4-N1 "C: \ Program Files \ Microsoft Office \ OFFICE11 \ outlook.exe "
This will give a few seconds to close Outlook, then it will relaunch itself, then automatically Minimize the startup so that you have at least the macro O
Comments
Post a Comment