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

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.

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.

Outlook plugin - Fetch emails with specific message ids

I am writing a plugin for Outlook, where I need to fetch only few emails based on some back end Logic.
I have stored those email Message Unique Ids in my DB. And on click of plugin Icon, I wish to load only those Emails to load in my Inbox.
Example, the logic is same as how we click on particular folder like sent items or unread items, it refreshes the Inbox with only the respective emails.
I have created a plugin icon following the tutorial:
https://learn.microsoft.com/en-us/outlook/add-ins/addin-tutorial
Using NodeJS for coding. Can you please give a pointer, how do we load emails in Inbox? or if we can load only specific emails in Inbox?
This is not possible if you're attempting to use the Outlook's inbox display module to show the items you're refreshing. You will have to open a dialog / or a new browser tab to show the custom list of items - which I think is not good user experience. As Brian called out, office-js add-ins are quite restricted.

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.

Open Outlook OFT template and populate recipient address

Working in a Windows Forms application and VB.NET.
I need to pop open an Office "New Message" window, populate the "To" address, and place an OFT template in the body of the message. I do not need to modify anything in the template.
To open the new message with the template, i could:
Diagnostics.Process.Start("MyFile.oft")
But this will not help with setting the TO address, or subject.
I also don't want to download any third party add-ons.
Any help??
You can use the Outlook Object Model and call Application.CreateItemFromTemplate. You can then set Subject/To/CC/BCC properties and the Recipients collection on the returned MailItem object.

SharePoint 2010 Email Outlook File to Library with attachments embedded

The only way I have found to retain attachments with an email from Outlook to SharePoint is to do a save as .msg and drag and drop into the SharePoint library.
I would like to set the library to receive email and retain the attachment as part of the email. I don't want the attachments to separate from the email when they arrive in the library.
Is there an add-in to Outlook or a fix in SharePoint 2010??????
You have two options:
1. Stick with the SharePoint options like adding attachments to the library or to a sub folder of the library based on subject or sender.
2. Write a custom email event handler. Here is an example for 2007, but it should work in 2010 as well: http://blogs.msdn.com/b/malag/archive/2009/05/13/attachments-disappear-with-custom-email-event-handler.aspx
marco
Marco, when I created the EventHandler to try and retain the message and attachment when activated it still came through as it was before by separating the message and attachment in two different files
Yes there are add-ins. I have used some 3rd Party tools for Outlook and SharePoint:
Scinaptic's OnePlaceMail
Colligo
Macroview
They are all good.