Editing and saving any Inbox mail item in Outlook creates 1 more mail - outlook-addin

When I double-click and open any mail in Outlook 2013, there is an option to Edit the message in "Actions".
When I edit the message and save it, Outlook creates 1 more mail item.
Now, there are 2 mail items in Inbox.
Why does Outlook create another mail?
It happens the same if I save the mail item programmatically.
Is there a way I can find out which is the newly mail item and then delete the same?

Related

Outlook mail : option to change mail subject color using vsto

I have couple of doubts regarding Outlook addIns.
I created a ribbon for Outlook application using VSTO.
While sending the mail i call some API and make some db entries.
I keep the mail in inbox even after i sent the mail.
Now i need an option to change the color of that message subject (like indication this is already send. eg : unread mail subject is in bold )
Is there any way that i can achieve this ?
The ribbon i created is showing under Add-ins menu.
i wated to show this in Home itself.
I tried tab idMso="TabHome", TabMail etc but its not working (i am using office 2010)
You would need to modify the view setting based on some condition - look at an existing Outlook views that bold the unread messages and display overdue messages in red.

How to disable Pinned TaskPane when clicked MailItem from Archive Folder

I have enabled the SupportsPinning in Manifest and also implemented event handler of ItemChanged. It works prefect until one of our users, pinned the taskPane and search email item with "All Mailboxes".
[Steps to reproduce]
Click any email item in Inbox
Activate the Addin
Pinned the Addin
Search something with "All mailBoxes"
Got some results which emails are locating in Archive MailBox
click to the email which it is located in Archive MailBox
ItemChanged event fired from last selected email
TaskPane looks like unload and reload
Office.Initialize will not be fired, but general JQuery could be fired.
None of the any Office API will be executed
Select other email which it is located in Inbox
no change on TaskPane, ItemChanged would fire
Addin only works normal if I close and re-activate the addin
After some searching and read carefully, I found that mail items in Archive Mailbox is not supported to activate the addin. If I click any email item outside of the "Search results", the addin button won't be available. But as of the Pinned feature, now we could have a way to be "activated" the addin from not supported mail item.
https://learn.microsoft.com/en-us/outlook/add-ins/#mailbox-items-available-to-add-ins
is there a way to "Force" disable the activation or "force" close the addin when user selected any "non-supported" email item?

Office.js issue with fetching “to” field of a message in Outlook for Mac 16.18 (181014)

I’m working on an add-in for Microsoft Outlook, and I’ve noticed that in the latest version of Outlook for Mac, 16.18 (181014), our add-in is unable to retrieve recipients of a draft that’s just been created. Our add-in is attempting to fetch the recipients using office.js’s Office.context.mailbox.item.to.getAsync() method. To reproduce this issue:
While reading an email in your inbox, click the “reply” button to begin drafting a new email; the new draft should automatically have a recipient in the “to” field because it is a reply.
From this draft, open an add-in which will try to fetch the draft’s “to” recipients by calling Office.context.mailbox.item.to.getAsync(). No recipients will be found.
In the “to” field of the draft, add an additional recipient, and
then remove this recipient.
Try to fetch the recipient from your
add-in again by calling Office.context.mailbox.item.to.getAsync() -
this time you will be given the “to” recipients correctly.
We’ve only noticed this issue in version 16.18 (181014). It appears that the user must manually edit the “to” field before the getAsync() method is able to give us its contents.

How to Send All Emails From Outlook Outbox in VBA

I'm using Excel VBA to stage emails in Outlook and it is working well.
Dim template As Outlook.MailItem, tomerge As Outlook.MailItem
' Create E-mail
tomerge.Close olSave
The e-mails can then be manually moved to the Drafts folder and sent using this Sub.
'Loop through items in Drafts folder
objDrafts.Item(i).Send
However, many users have a bunch of extra drafts in their Drafts folder that they don't want sent.
If I replace "olFolderDrafts" with "olFolderOutbox" and try to send from their Outbox. The first message sends and then I get a "Run-time error" "Outlook has already begun transmitting this message".
Is there some way to send all from the Outbox or even better is there someway to stage and send from a newly created folder?
You need to create a folder for your unsent items and process them separately. As a rule the Outbox folder contains already submitted items. So, that's not a right place for your items.
The Outlook Object Model provides the Add function of the Folders class. You can get an instance of the Folders class using the Folders property of the Folder class in Outlook. You can read more about that in the How To: Create a new folder in Outlook article.
This answer was inspired by Nagarajan's comment above, but there are quite a few changes necessary from the answer in Send/Receive in Outlook Via Code. The main problem is using olSave doesn't put the messages in a "ready to send" state in Outlook so starting a sync using syc.Start from the answer above does nothing.
Instead, we found the following process to be straight forward:
Put Outlook in offline mode using "Send/Recieve" -> "Work Offline"
Use Excel VBA to stage the e-mails and instead of saving just .Send each email. As Outlook is offline they will be staged and ready to be sent but not actually sent.
The e-mails should now be staged in Outlook's Outbox folder and can be reviewed just be sure to press the "send" button after reviewing/editing messages otherwise the e-mail you modified will be removed from the queue.
When the messages are ready to be sent put Outlook back in online mode and they will be sent automatically.

Mark a mailitem as sent (VBA outlook)

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:
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.