Listing All Emails in Inbox by Outlook Web Addin - outlook

I am able to get details of previewed email by this JavaScript command:
console.log(Office.context.mailbox.item);
But I need to list all emails in the inbox (not only previewed one) by using Office JS, is it possible, if so how can I do it? (Its also okay receiving details from specified ID or e-mail number, if possible.)
Thanks!

No, it is not possible. Office web add-ins work under the context of currently selected item in Outlook only. If you need to access other items in the user's mailbox I'd suggest using Graph API, see Outlook mail API overview and Authorize to Microsoft Graph with SSO for more information.
Also you don't forget that VSTO based add-ins allows dealing with all items in Outlook stores. See Walkthrough: Create your first VSTO Add-in for Outlook for more information.
Feature requests on Tech Community are considered, when the dev team go through the planning process. Use the github label: “Type: product feature request” at https://aka.ms/M365dev-suggestions .

Related

Outlook Add-in: move email to specific folder

Outlook Add-ins are allowed to move emails to specific folder or even deleted folder?
If yes how can be done?
I didn't find anything about on the docs.
You can use EWS or Graph API for that. See Explore the EWS Managed API, EWS, and web services in Exchange for more information about EWS. More information specific to Outlook web add-ins can be found in the Call web services from an Outlook add-in article.

exporting contacts of outlook into excel/sharepoint using outlook add in

I am working in a project where i have to access outlook contacts and have to give specific domain-name and export into sharepoint list or excel sheet .
i wonder if outlook REST api be usefull to access contacts and if accessible will i be able to compare the inputted domain name with other contacts in outlook and export through a click in excel .
is there any other way i can do this project using "add in" only
please note:-(yes there are many ways we can export the excel sheet and all but i want to automate this thing using an "add in")
Outlook web add-ins work under the context of currently selected item in Outlook only. To access other item you may consider using Microsoft Graph API which is a RESTful web API that enables you to access Microsoft Cloud service resources.
See Outlook personal contacts API overview for more information about contacts API.

How to upload outlook attachments to a web service using outlook add-in (Office add-in)?

I have a Outlook Add-in developed using VSTO,that among other features allows a user to select attachments from an email and then upload it to a website. The uploading is done by calling an web-service that resides on the website. I want to convert the VSTO add-in to a Office add-in for making the add-in available on platforms other than Windows. I was searching how this can be achieved. As per the SO post here, Access to the attachment in Outlook web add-in, Outlook Add-in cannot pass the attachments of a selected item directly to the remote service that runs on your server. Instead, the add-in can use the attachments API to send information about the attachments to the remote service. The service can then contact the Exchange server directly to retrieve the attachments.
My clients do not use an Exchange server. If Outlook Add-in cannot pass the attachments directly, I need to download the attachments to a temporary folder on the user's machine and then upload it to the web service from the outlook add-in. Is this possible ? Is there any other alternative to achieve what I want ?
I need to download the attachments to a temporary folder on the user's machine and then upload it to the web service from the outlook add-in. Is this possible ?
This is exactly what I do. Get the path to a folder like Roaming with
Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) //C#
download the attachments, encode them, create a json object and send them to your service.
This is the most convenient solution imo
As per this link, Office Add-ins are not supported for Outlook using POP or IMAP accounts.
Requirements for running Office Add ins
I am pasting below the relevant text from the article.
This is unfortunate. This means there is no way to provide customized solutions in Outlook for the following use-cases.
Outlook on Mac or IPad with a POP or an IMAP email account.

Accessing Appointments in Outlook without ActiveX

I'm currently working on a project where I'm sending and updating Appointsments. I would like to do this without the use of ActiveX since I don't want to be limited to IE. I've been googeling for quite some time now, but I couldn't find anything that helped, so here's my question. Is there any way I can access or update appointments without the use of ActiveX.
We also have access to the OutlookWebApp, so maybe there's an interface there. Would be great if someone had an idea. Thanks in advance and
Greetings Chris
You can use Exchange Web Services (web or desktop app) or the EWS Managed API (desktop app only) to access data in Exchange Mailboxes: https://msdn.microsoft.com/en-us/library/office/jj162981.aspx.
If you are working with Office 365 mailboxes you can use the Outlook REST or Microsoft Graph APIs: https://dev.outlook.com/
If your solution requires a UI in Outlook Online (OWA) then you can access contextual data (i.e. the current email or appointment) with an Outlook Add-in (you can use EWS requests from it as well): https://dev.outlook.com/reference/add-ins/

Move/Delete Emails in an Office 365 add-in

I have an Outlook 2013 add-in that I'm developing. Its very simple - it forwards the selected email as an attachment to a specific address and then it deletes the email selected. (Really just moves it to the recycle bin).
If our organization upgrades to Office 365, is there anyway to replicate that functionality with the 'new' add-ins? The javascript API's don't seem to give any way of moving emails to other folders or otherwise 'deleting' them.
https://msdn.microsoft.com/en-us/library/office/fp142185.aspx
Is there another method/API for developing add-ins for Outlook 365?
Thanks!
Mail Apps are run in the context of items and JavaScript API for Office doesn't provide any methods for that. You need to use EWS or Office 365 API for getting the job done. Also see EWS Managed API, EWS, and web services in Exchange for more information.

Resources