How to hide "This message has not been sent" message in Outlook

P

Peter

Hi all,

I'm using an add-in to store (some) outgoing Outlook e-mails in a DMS.
Since it's stored *before* the message is actually sent, the send status of
the message is 'not sent' in the DMS.
When users reopen the message from the DMS, they are confused, since Outlook
will say "This message has not been sent".

Does anyone have an idea of how to suppress this message?

If the event handlers would work properly, I could delay adding the message
to the DMS until it appears in the Sent-Items folder, but that can have
side-effects, for example, if message delivery is deferred or if the message
cannot be delivered for some reason. The message should be stored in the DMS
right away, but preferrably, without any delivery status information.

Peter
 
K

Ken Slovak - [MVP - Outlook]

No way to set Sent on an item unless it's sent, and no way to suppress that
information on the InfoBar. Also no code access to the InfoBar.

If you are using Extended MAPI (C++ or Delphi only), or a MAPI wrapper such
as Redemption (www.dimastr.com/redemption), you can create a new item and
copy the original to the new item and before saving it for the first time
you can set Sent. Otherwise it can't be done.
 
D

Dmitry Streblechenko

How do you create the messages in the Outbox?
In case of OOM only you might be able to create a post item (which are
created in the sent state), then change the mesage class back to IPM.Note.

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
 
P

Peter

Ken,

Thanks for your forward answer. I will take a look at your suggestions,
since the current solution is still confusing for the user.

Peter
 
P

Peter

Hi Dmitry,

The mail item is created from another application (the DMS explorer) using
..NET and the Outlook.Application class using the CreateItem() method.

Registering the e-mail is done using an Outlook add-in, to prevent unwanted
Outlook warning messages.

regards,
Peter
 
D

Dmitry Streblechenko

I don't think I understand - Application.CreateItem will create the message
in the corresponding default folder. For the regular mail messages you will
end up with a message in the Drafts folder.
Use Items.Add instead to create a post item rather than a mail item.

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
 
P

Peter

Hello Dmitry,

I don't have a problem *creating* the mail message, it's about the delivery
status (not sent) that is stored in the DMS that I would like to loose.

What is a 'post' item anyway? I know of Mail items, Note items etc. I really
need to create a Mail item, since I want to send an e-mail. Using the
'OnSend' handler, which is associated with the Send button, I register a file
version of the e-mail in the DMS.

regards,
Peter
 
K

Ken Slovak - [MVP - Outlook]

Post items are "IPM.Post" as opposed to "IPM.Note" (emails). You can use
New, Post to create a Post item in a mail for as an example.

If you create a Post item as Dmitry suggests, set the properties you need
for sent status before saving the item (that makes those props read only),
you can then change the MessageClass of the item from "IPM.Post" to
"IPM.Note" to make it a mail item.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top