0
votes

I have problem with change the sent property of mail, because the property is read-only and I need to change it from the level of vba.

The problem appears after sent the mail from a shared mailbox (using online outlook mode). The mail doesn't go to folder "sent items" in shared mailbox but stay in outbox folder. I have made macro to move the mail to correct folder and everything is fine but the mail have status unsent (when you open the mailitem you are in editing mode). I can't find any solution for the problem.

This is the outbox folder with correctly sent mail and mail sent from shared mailbox:

image screenshot

2
Can you verfy, the mail is really sent?lokusking
Yes, every email sent from shared mailbox was delivered.Błażej Łaszewski
It seems this describes your problem. There is no possibility to achieve your goal with vba obviouslylokusking
Ok, when I press the button "Send/Receive" the mail change the status, so it's helpful ;) remember that I'm writing about problem with outlook in online mode (not exchange mode). As I said before the mail is deliver but somehow in outbox folder stays as unsent.Błażej Łaszewski

2 Answers

0
votes

I resolved the problem with not very tidy way. I changed the registry key DelegateSentItemsStyle to 0 and when I did it, the sent mails went to my personal sent Items folder. Then I just move the mails to shared mailbox.

0
votes

On the low (Extended MAPI) level, send/unsent status (MSGFLAG_UNSENT bit in the PR_MESSAGE_FLAGS property) can only be changed before the item is saved for the very first time.

Outlook Object Model is subject to the same limitation of course, and the only way to create an item in the sent state is to create a PostItem object - it is created in the sent state. You will then need to change the message class back to IPM.Note and remove the icon related properties to make sure the item looks right.

Redemption lets you change the item's state (RDOMail.Sent is read/write until the first call to Save).

back to your particular problem, you need to figure out why the items is left in the folder in the unsent state, not try to "fix" it.