Office JS Outlook and update email body when composing a form - outlook-addin

I would like to know if with Office JS Outlook addin, is it possible to set email body automatically when opening and composing an email.
I have already succeed to do it using addin commands and MessageComposeCommandSurface extension point element in the manifest.
However, my code is execution only after a click on a button in the ribbon.
Is it possible to execute my code automatically when the compose form is loading instead of having to click in a button to execute it?
Thanks a lot

This isn't a supported scenario.

Related

Outlook project distribution with custom tab and button to trigger userform

I have created Userform in Outlook Called "Task Manager", which attach the current emails to the task selected from the list.
As excel has .xlsm and word has .docm to add custom tabs, button and save macro to share it with your colleagues. but I realized that outlook is independant, there is no file related to outlook. So there must be a way to add custom tabs and button to trigger the UI at runtime.
we need to do it other way around? I am looking for a method to share .exe file to another user so that they can install the .fxm files and have a custom tab. already searched internet could not find feasible solution, I don't know the right way to start?

In outlook Item send event handler , click the send button error thrown while Message sending

In Outlook New message compose or Edit the outlook event ,send button click ,(By use The Item send event handler In outlook add-ins) , click the send button this error thrown
But I want this , when i click the send button that one is trigger on my outlook add-ins command.js file , it not trigger anything in this file , this error thrown
In outlook add-ins manifest.xml file use this code for item send event handler
<ExtensionPoint xsi:type="Events">
<Event Type="ItemSend" FunctionExecution="synchronous" FunctionName="validateSubjectAndCC" />
</ExtensionPoint>``
this mentioned function name called on my command.js file ,but inside the function not trigger anything , it shown on outlook info bar error
Notes : My outlook add-ins developed by using javascript language
Any thoughts about this Please share me
Thanks In Advance
Most probably the OfficeJS runtime can't locate the function mentioned in the add-in's manifest file. Make sure the add-in is hosted within a URL mentioned in the manifest file. Also you may try to run the sample add-in available on GitHub.

How to associate code with a checkbox in an Outlook template?

I have created an Outlook template with checkboxes included. I want to display a message when a checkbox has been ticked. I have written some basic codes (msgbox etc.) related to each checkbox.
Issue:
How can I include/integrate my codes in the Outlook template?
Looks like you need to create a new custom Outlook form with a code behind. You can read more about that in the Create an Outlook Form article.
You will not be able to achieve the required functionality with a message body. Any scripts from message bodies can't be run for security matters.

Hotkey to run macro when viewing the email

I have a macro that sends a reply to email selected in the inbox. I assigned it to the Quick Access Toolbar and run it by pressing alt+1.
The hotkey does not work when I view the email itself (I sometimes open it from within a task). In email view I can go to the macros ribbon and run it manually and it works, but I can't find the way to run it with the hotkey. Any suggestions?
I need to view email and decide if I run the reply macro or not, so a solution to run it on open action won't work.
edit: solution i comments
There is a separate Quick Access Toolbar for open mailitems. If the 1 is over the Save icon, you are currently saving with Alt+1.
If the code can process ActiveInspector.CurrentItem then you can add the macro.

VBA when user clicks Send as Attachement

My company has an issue with Outlook when it is triggered to open by Excel that causes Outlook to hang indefinitely when loading (an issue which cannot be easily fixed). We have a few workbooks with custom ribbons where we now check that Outlook is open first before allowing the user to send via email. The problem is that this doesn't account for users that still use the File > Save & Send > Send as Attachment.
I would like to know if anybody knows about a process by which I can add on a routine to the existing button that we could save as an Excel Add In on everyone's Excel that checks first if Outlook is open? I have the Outlook check written so I'm just needing help with finding a way to run it.
Any help is appreciated.
Alternatively you could disable Send as Attachment.
I wouldn't know what is important so I won't copy parts here.
How do you disable “Save and send” in Excel 2010 (in the File ribbon (called backstage in Office 2010)?
Disable the Send button in the Office Menu
You may consider repurposing the ribbon controls. See Temporarily Repurpose Commands on the Office Fluent Ribbon for more information.
Unfortunately the Backstage UI doesn't allow to repurpose controls from the XML markup. You may consider hiding the built-in UI and rebuilding it fully with custom commands. Thus, you will be able to handle the commands on your own. You can read more about that in the Introduction to the Office 2010 Backstage View for Developers article. Also see the Customizing the Office 2010 Backstage View for Developers article.