PC Review Forums Newsgroups Microsoft Outlook Microsoft Outlook Program Addins Disabling "send immediately when connected" programmatically

Reply

Disabling "send immediately when connected" programmatically

 
Thread Tools Rate Thread
Old 30-06-2003, 09:43 PM   #1
kris b.
Guest
 
Posts: n/a
Default Disabling "send immediately when connected" programmatically


Not positive if this will work, but it's a different
direction to the one your trying, maybe a modified version
would help, but here's my idea:

If I'm not mistaken the inspector will remain open while
sending, then dies once the message is sent, no matter
what the size of message or its attachments.

So implement either a "WithEvents" or "AddHandler" for the
inspector's _Close event then test to make sure it's the
last man off the boat:
('golapp' being the global outlook variable)

If golApp.ActiveExplorer Is Nothing And
golApp.Inspectors.Count <= 0 Then
GoTo ExitAddin ' Do the close here
End If

If an explorer is also spawning you'll need to capture its
_Close event, too.

>-----Original Message-----
>Via the Outlook Object Model, I have an application that

can display an
>Outlook 2002 MailItem Inspector by calling the Display

(false) method on a
>new MailItem object. This will generate a non-modal

inspector.
>
>The Outlook 2002 application itself is not running, just

the Application
>object.
>
>If Outlook 2002 is configured in Send/Receive to "Send

immediately when
>connected", and you send an e-mail with a large

attachment, and then
>shutdown the application, you may get an Outlook 2002

error "the task was
>cancelled before it was completed".
>
>Obviously, one cannot shutdown the OOM application object

prior to the
>Outlook spooler doing its job.
>
>One possible workaround is to force the MailItem not to

be spooled in the
>first place.
>
>Is there a hidden or undocumented MAPI property or hack

where I can mark a
>MailItem as "do not send immediately"?
>
>Yes, I can generate a modal Inspector, but I don't want

to do that. I would
>rather that mail pile up in the Outbox then abort the

spooler half way
>through a task.
>
>
>.
>

  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