A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook - General Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

How to run a batch file wen you close Outlook



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old April 21st 08, 10:11 AM posted to microsoft.public.outlook
gamul
external usenet poster
 
Posts: 9
Default How to run a batch file wen you close Outlook

Hello!
Is some way to run a script /batch file when user closed Outlook?
MS Outlook 2007.


Ads
  #2  
Old April 21st 08, 11:20 AM posted to microsoft.public.outlook
Vince Averello [MVP-Outlook]
external usenet poster
 
Posts: 2,028
Default How to run a batch file wen you close Outlook

You could write a script of your own that:
- starts Outlook
- waits for it to close
- runs what ever you want

Use that script to run Outlook as opposed to any other shortcuts or menu
entries

"gamul" wrote in message
...
Hello!
Is some way to run a script /batch file when user closed Outlook?
MS Outlook 2007.


  #3  
Old April 21st 08, 11:48 AM posted to microsoft.public.outlook
gamul
external usenet poster
 
Posts: 9
Default How to run a batch file wen you close Outlook

Doesn't Outlook have the built-in function of starting scripts during
closing?

"Vince Averello [MVP-Outlook]"
...
You could write a script of your own that:
- starts Outlook
- waits for it to close
- runs what ever you want

Use that script to run Outlook as opposed to any other shortcuts or menu
entries

"gamul" wrote in message
...
Hello!
Is some way to run a script /batch file when user closed Outlook?
MS Outlook 2007.




  #4  
Old April 21st 08, 01:12 PM posted to microsoft.public.outlook
Brian Tillman
external usenet poster
 
Posts: 17,452
Default How to run a batch file wen you close Outlook

gamul wrote:

Is some way to run a script /batch file when user closed Outlook?
MS Outlook 2007.


Why start a new thread when you're already discussing this same question in
another?
--
Brian Tillman [MVP-Outlook]

  #5  
Old April 21st 08, 01:16 PM posted to microsoft.public.outlook
Vince Averello [MVP-Outlook]
external usenet poster
 
Posts: 2,028
Default How to run a batch file wen you close Outlook

There's a possibility that you could add code to the Application_Quit()
event in the VBA editor but you'd still have to code it yourself

"gamul" wrote in message
...
Doesn't Outlook have the built-in function of starting scripts during
closing?


  #6  
Old April 21st 08, 01:42 PM posted to microsoft.public.outlook
gamul
external usenet poster
 
Posts: 9
Default How to run a batch file wen you close Outlook


"Brian Tillman"
...
gamul wrote:

Is some way to run a script /batch file when user closed Outlook?
MS Outlook 2007.


Why start a new thread when you're already discussing this same question
in another?
--
Brian Tillman [MVP-Outlook]


Sorry,
I thought, that old thread nobody reads already.


  #7  
Old April 21st 08, 01:55 PM posted to microsoft.public.outlook
gamul
external usenet poster
 
Posts: 9
Default How to run a batch file wen you close Outlook


"Vince Averello [MVP-Outlook]"
...
There's a possibility that you could add code to the Application_Quit()
event in the VBA editor but you'd still have to code it yourself

"gamul" wrote in message
...
Doesn't Outlook have the built-in function of starting scripts during
closing?


So as recommended me user Gordon (in different thread) I wrote VBA script,
which copies files .PST to or from net.
I would like to start this script every time when user logs in to computer
as well as when Outlook switches off.

There's a possibility that you could add code to the Application_Quit()

Please, continue with this think.


  #8  
Old April 21st 08, 03:10 PM posted to microsoft.public.outlook
gamul
external usenet poster
 
Posts: 9
Default How to run a batch file wen you close Outlook


" ...

"Vince Averello [MVP-Outlook]"
...
There's a possibility that you could add code to the Application_Quit()
event in the VBA editor but you'd still have to code it yourself

"gamul" wrote in message
...
Doesn't Outlook have the built-in function of starting scripts during
closing?


So as recommended me user Gordon (in different thread) I wrote VBA script,
which copies files .PST to or from net.
I would like to start this script every time when user logs in to computer
as well as when Outlook switches off.

There's a possibility that you could add code to the Application_Quit()

Please, continue with this think.



Ok.
It with my tests results, that this can be made across macro in Outlook
(thanks Vince Averello):
Sub Application_Quit()
Dim RetVal
RetVal = Shell("D:\temp\mm.cmd", 0)
End Sub

mm.cmd looks so:
D:\temp\proc.vbs

It works!

It during starting Outlook, was can this make (how Brian Tillman advised in
different thread) creating shortcut starting Outlook which will look so:
call D:\temp\proc.vbs
"C:\Program Files\Microsoft Office\Office12\OUTLOOK.EXE"

I thank for help with all.
I greet.


 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Data File Did Not Close Properly Jan Groshan Outlook - General Queries 15 December 15th 09 11:27 AM
Outlook 2003 Close Data File Michael Obymako Outlook - General Queries 1 October 9th 07 12:03 AM
Outlook Tiime Zone Update Using Batch File Anna_Stephanie Outlook - General Queries 2 March 9th 07 09:12 PM
Batch file blocked Nananana Outlook - General Queries 2 March 12th 06 08:21 PM
can't close PST file... Mark J Kubicki Outlook - General Queries 2 March 11th 06 07:00 PM


All times are GMT +1. The time now is 07:48 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2024 Outlook Banter.
The comments are property of their posters.