PC Review Forums Newsgroups Microsoft Outlook Microsoft Outlook VBA Programming Closing Outlook Programmatically

Reply

Closing Outlook Programmatically

 
Thread Tools Rate Thread
Old 18-02-2004, 05:28 PM   #1
Jerry Camel
Guest
 
Posts: n/a
Default Closing Outlook Programmatically


I've got a script that deletes the Outlook address cache file, but I need to
close Outlook before I can do this. The powers that be want the enitre
process automated, so I need to close Outlook from the script. Closing the
app is not a problem, but is there a way to supress the prompt for emtying
the trash? (Corp policy is to have Outlook prompt when closing and I can't
change corp policy... Nooo... wouldn't want to do that!) So I need a way
around it programmatically. Help?

Jerry


  Reply With Quote
Old 24-02-2004, 08:55 PM   #2
Eric Legault [MVP - Outlook]
Guest
 
Posts: n/a
Default Re: Closing Outlook Programmatically

You might be able to use some of the window handle functions in the Win32
API (GetWindowHandle?) to pass the focus to the empty trash dialog. Then
you can try using SendKeys to click away the prompt. Might work, might
not - SendKeys can be tricky.

--
Eric Legault - B.A, MCP, MCSD, Outlook MVP
Job: http://www.imaginets.com
Blog: http://blogs.officezealot.com/legault


"Jerry Camel" <rlrcstr@msn.com> wrote in message
news:uu3HxTk9DHA.1392@tk2msftngp13.phx.gbl...
> I've got a script that deletes the Outlook address cache file, but I need

to
> close Outlook before I can do this. The powers that be want the enitre
> process automated, so I need to close Outlook from the script. Closing

the
> app is not a problem, but is there a way to supress the prompt for emtying
> the trash? (Corp policy is to have Outlook prompt when closing and I

can't
> change corp policy... Nooo... wouldn't want to do that!) So I need a

way
> around it programmatically. Help?
>
> Jerry
>
>



  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

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