Group:  Microsoft Outlook ยป microsoft.public.outlook.program_addins
Thread: Close New Mail Window programmatically

Geek News

Close New Mail Window programmatically
Steffen Heinzl <steffen.heinzl[ at ]informatik.fh-fulda.de> 1/18/2007 1:35:27 PM
Hi!

If I create a new mail object with my Outlook Application, is it
possible to close the gui element representing the mail programmatically?
I want to abort sending the mail and close the mask.

Best Regards,
Steffen
Re: Close New Mail Window programmatically
Steffen Heinzl <steffen.heinzl[ at ]informatik.fh-fulda.de> 1/18/2007 2:12:28 PM
Steffen Heinzl wrote:
[Quoted Text]
> Hi!
>
> If I create a new mail object with my Outlook Application, is it
> possible to close the gui element representing the mail programmatically?
> I want to abort sending the mail and close the mask.
>
> Best Regards,
> Steffen

Perhaps more specifically:

In my send handler I have a reference to an inspector and my created mail.
I can call close on my mail, but I get an exception that my mail cannot
be closed during Send. So is there a workaround or does anyone know if
there is something like an "after send" event?
Re: Close New Mail Window programmatically
"Ken Slovak - [MVP - Outlook]" <kenslovak[ at ]mvps.org> 1/18/2007 3:21:01 PM
You can cancel the send, set up a timer that fires after the Send event
finishes and let the timer handler close the item. If you send it then it
should close automatically after it's sent.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Steffen Heinzl" <steffen.heinzl[ at ]informatik.fh-fulda.de> wrote in message
news:eonv73$lld$1[ at ]surz18.uni-marburg.de...
[Quoted Text]
> Steffen Heinzl wrote:
>> Hi!
>>
>> If I create a new mail object with my Outlook Application, is it possible
>> to close the gui element representing the mail programmatically?
>> I want to abort sending the mail and close the mask.
>>
>> Best Regards,
>> Steffen
>
> Perhaps more specifically:
>
> In my send handler I have a reference to an inspector and my created mail.
> I can call close on my mail, but I get an exception that my mail cannot be
> closed during Send. So is there a workaround or does anyone know if there
> is something like an "after send" event?

Re: Close New Mail Window programmatically
"Johannes" <jkienzle[ at ]gmail.com> 1/18/2007 6:35:00 PM
You could also copy the mail, send the copy, and then close the
original email's inspector.


Ken Slovak - [MVP - Outlook] wrote:
[Quoted Text]
> You can cancel the send, set up a timer that fires after the Send event
> finishes and let the timer handler close the item. If you send it then it
> should close automatically after it's sent.
>
> --
> Ken Slovak
> [MVP - Outlook]
> http://www.slovaktech.com
> Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
> Reminder Manager, Extended Reminders, Attachment Options
> http://www.slovaktech.com/products.htm
>
>
> "Steffen Heinzl" <steffen.heinzl[ at ]informatik.fh-fulda.de> wrote in message
> news:eonv73$lld$1[ at ]surz18.uni-marburg.de...
> > Steffen Heinzl wrote:
> >> Hi!
> >>
> >> If I create a new mail object with my Outlook Application, is it possible
> >> to close the gui element representing the mail programmatically?
> >> I want to abort sending the mail and close the mask.
> >>
> >> Best Regards,
> >> Steffen
> >
> > Perhaps more specifically:
> >
> > In my send handler I have a reference to an inspector and my created mail.
> > I can call close on my mail, but I get an exception that my mail cannot be
> > closed during Send. So is there a workaround or does anyone know if there
> > is something like an "after send" event?

Re: Close New Mail Window programmatically
Steffen Heinzl <steffen.heinzl[ at ]informatik.fh-fulda.de> 1/19/2007 12:54:23 PM
Johannes wrote:
[Quoted Text]
> You could also copy the mail, send the copy, and then close the
> original email's inspector.
>
Thanks. I didn't notice that the Inspector also has a Close method.

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net