I'm looking to create an Add-In for Outlook that allows users to save emails, which are saved against a company in our system. Currently this works by the user opening an email and clicking a button I've created which opens the taskpane containing a form (which asks the user to select a company against which the email will be saved, and optionally provide an email description), whereupon pressing 'save' the email's ID and other relevant information are sent to an API which fetches the email from the rest API and saves the file in our system.
This technically works, though ideally I would like some functionality along the lines of:
User sends an email
my add-in to ask the user if they want to save the email immediately after they sending
If 'yes' is clicked, for the email saving form to appear in either the taskpane or a separate window so it can be saved
This is simply so they don't have to navigate through to their sent messages after sending and save them manually.
Currently I have tried using the ItemSend event for this, however it seems this is more for appending things to the email before it sends rather than after, and I don't seem to be able to use this event to get the email item or its ID. I had thought about potentially using the event to send the email to a custom mailbox and have it save as a result of this using a flow of some kind, however I think this would be rather difficult to implement due to needing user input to save the email in our system.
Related
I am currently trying to create a form in Outlook. I want to be able to send this form to different people so that they can make changes to the form and send those changes back to me as a response.
I have a published form in the meantime. My current problem: The recipient does not see the form until he "undocks" the email from the Outlook app and the changes made there are not transmitted to me; I just get an empty form. How or where can I save this data that the recipients enter? I am grateful for any help!
The form definition includes all the fields and the code that you add to the form. As a general rule, publish the form definition to a forms library instead of sending the form definition with the item. If you cannot publish your form to a forms library, you can select the Send form definition with item check box on the Properties page so that other users can see the form pages when they receive items that are composed by using the form.
Forms that you only intend to use once and not publish are referred to as one-off forms. Because of security concerns with one-off forms, users might not see the form correctly when they open items sent to them with a one-off form. In this case, sending the form definition with the one-off form provides the necessary information required to display the form correctly for the users.
To change how users reply to your form, click the Actions page. The Actions page lists the default Reply forms that are available. You can also add your own custom Reply forms. For example, forms based on a new email message have built-in Reply, Reply to All, Forward, and Reply to Folder forms. When users receive your form, the form contains buttons and menu commands so that users can respond to the form. You can disable some or all of these default forms and set attributes that define how these Reply forms appear.
Read more about that in the Create an Outlook Form section of MSDN.
I have an outlook Macro that collects some information from existing emails and a local database, then serves up a templated email with the information. The user can then review the email, make changes if they want to and then send or not sent (quit/cancel). Is there a way, I can keep the macro running and then execute more code if the user sends the email?
I've created some psuedo code below on how I'm hoping it might work:
Function CreateEmailThenExecuteCode()
Dim newEmail As MailItem
Set newEmail = Application.CreateItem(olMailItem)
newEmail.Display
'Allow user to review and send email
'If they 'send', then execute further code.
If Not Sent Then Exit Function
'Further code
End Function
I know that I can create a new macro that runs every time a user sends an email - but it would be much easier if I can keep the existing macro running, as otherwise I need a way of saving the data from the running macro.
I also know that I can create a custom user form that mimics an email user form - but I would prefer to keep the functionality of the full email user form, especially with access to email address lists etc.
Is it possible?
The Display method doesn't prevent your code from running until you pass true to make the Inspector window modal. The default value is false.
At the same keeping the code running after the Display call doesn't allow users to deal with Outlook UI because the VBA code will be run on the main thread (UI).
You may consider setting up an event handler for the Send event which is fired when the user selects the Send action for an item, or when the Send method is called for the item. So, you will be aware when the item is sent out.
Also you may find the MailItem.Close event helpful. It is fired when the inspector associated with an item is being closed. So, you will also be aware when the item is closed.
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.
I'm trying to make a simple view based application.
I want to receive information with the content of text fields when user filled text fields and hits the submit button.
The way I do this doesn't matter so much. It can be done by sending information to a web server or sending information to my e-mail in background. Actually it seems easier to do it via e-mail.
I just want to know what the user wrote on text fields when he hit the submit button.
In my app for iPad I have several videos and pdfs. What I want is when user is watching a video or reading a pdf and if he wants to email that video or pdf to himself or to his friends, then how would he do it? I have added a button on the navigation bar for this purpose. When the user clicks that button an option should appear which should say "Email". now when the user selects Email, the app asks the user to enter an email address. After entering email address the user presses "Send" button. And that particular file is sent to the user's email. How can this be done?
Thanks
Take a look at MFMailComposeViewController class. It provides access to standard mail functionality and it includes addAttachmentData:mimeType:fileName: method to add attachments (and you also don't need to present custom UI for e-mail address).
However, if files are big (video), it makes sense to put them somewhere to your server and send only links and in this way avoid sending big attachments. This is important because many mail servers will not allow big attachments (10MB is already big).
I'm guessing you'd use MFMailComposeViewController, the same as for iPhone.