How do I create a custom Edit Contact form in Outlook 2016? - outlook

I'd like to be able to select a contact, and, either via right-click or a ribbon button, "Edit Advanced", which would take me to a form similar to the existing Edit Contact form but with some custom fields.
I'm thinking C# VSTO but I'm open to any solution that works.
Thanks in advance

What you need to do is change the MessageClass property of existing contacts (IPM.Contact) to the value of your custom form (e.g. IPM.Contact.Foo). So you will need to write a macro or add-in that will change this for all or selected items in any given folder.
There's a sample and tool available here: https://support.microsoft.com/en-us/help/201087/how-to-update-existing-items-in-an-outlook-folder-to-use-a-new-custom

Related

VSTO Outlook: Add new icon to the Outlook items shown in the explorer email list

On folder selection (Inbox, Deleted, Sent, etc.) the Outlook email items are shown listed in the explorer view as a list of Outlook items.
For each Outlook items, some icons (attach, etc.) are show on the right. How can I add new icons there for each outlook item? I want to do the same as explained here or here, but instead of changing an existing one, I would like to add a new one/s.
Additionally (this is optional) it would be great if I could execute some code when user clicks on it but I am ok if I can just show it.
UPDATE 05/10/2022
There are two posibilities:
Add new columns to the message grid preview in the explorer view, I mean put more columns at the beginning or after the last column (flag one). This view is obtained when you resize the width of the messages grid:
Use the existing last column of the messages grid preview, marked with a flag, and put there more icons with its click event handlers.
Is it possible to implement both above solutions?
There is no trivial way to inject custom icons there. The best what you could do is to use the PR_ICON_INDEX property with a set of predefined icons. The property contains a number that indicates which icon to use when you display a group of email objects.
As explained in the articles mentioned in your post you can use the PropertyAccessor.SetProperty to set up an icon for Outlook items.
Additionally (this is optional) it would be great if I could execute some code when user clicks on it but I am ok if I can just show it.
You can handle the SelectionChange event of the Explorer class which is fired when the user selects a different or additional Microsoft Outlook item programmatically or by interacting with the user interface. The Outlook object model doesn't provide any other events for that.
There is no way to add a new icon next to the old one - the message view in Outlook does not support that level of customization.
The only way to replace a build-in icon with a truly custom one (instead of using one from a few dozen predefined icons) is to create a custom form (even if exposes no customization) and specify an icon for that form. If the message class (MailItem.MessageClass) matches that of a custom form, Outlook will show your custom icon. Not ideal at all.

Buttons in a view in Dynamics 365

I am new with Dynamics 365 and are not sure of how I can achieve this.
I am looking into having some buttons in a view.
Maybe a view isn't the best way of doing it, but what I want to do is to have a list of records connected to the logged in user (similar to a view)
But on each row/record I want to have multiple buttons. These buttons can be like 'Complete' (Changes status on task and updates the view) , 'Send email'(Starts a workflow) and so on.
What are some of the ways of doing this? Either with Javascript/C#/plugin or something else.
You cannot add buttons in views/subgrids directly.
That’s when we add ribbon/command bar buttons using Ribbon workbench usually.
Create a Workflow Short Cut Ribbon Button (No Code Solution!)
Update:
There is a PowerApps Components Framework (PCF - preview) coming out soon, then we can build custom grid control with the layout/buttons we want.
This can be achieved with RibbonWorkbench. My answer does not differ much with #arun vinoth answer but just added few explanation lines.
https://ribbonworkbench.uservoice.com/knowledgebase/articles/132235-create-a-workflow-short-cut-ribbon-button-no-code
If you look at view below where I have selected number of contact and then I have a Button at top "Nominieren" which is shown and clicking on it will perform whatever action is needed.
There will be java-script on click of button, from Java script you could call Action or workflow or perform operation in Java script itself.
Link for Adding new Button : https://community.dynamics.com/crm/b/crmtipsfromadeveloper/archive/2017/07/26/know-how-add-a-ribbon-button-using-ribbon-workbench
Now when you look at image below I have no contact selected and it does not show button on Ribbon.
It might be possible. I haven't tried this but you can write JavaScript for a view column now (since CRM 2016).
If you go to a view you can double click on a view column to view its properties. There are two properties you might be interested in:
Web Resource
Function
Here's a link to an MS page that explains how to use these options to add an icon. It might be possible to create a clickable button which uses CRM's WebApi to perform some actions: Docs # Microsoft

Custom button on CRM Mail merge window

I want to put custom button on CRM Mail merge window and on click of that button , i want to store that document in sharepoint site document library.
please check below screen
Is it possible to put custom button?
This is not possible in supported way.
like Andrii said this is not a supported method and i would try and stay clear of this solution if you can. I would suggest thinking about implementing your code for sharepoint into ribbon button inside of Microsoft Word.

Set up Enable Rule in CRM Visual Ribbon Editor

I'm using the CRM Visual Ribbon Editor to create a custom button which sends all selected emails. However, since Email is an Activity entity, other activities could be in the user's selection when pressing the button.
Is there is an enable rule that specefies that all selected items are Emails?
If so, how do I use it?
If not, could a custom rule written in JScript work?
Thanks for any help!
I had to do something like this with a custom entity of mine. I needed to enable a button based on the record status.
I think something like this will only really be possible using a custom rule written in JScript that you could use to query the records and see what type they are.
Hope this helps

How to create a button like New Mail in Outlook add-in?

Can anyone pls tell me how to create a button(in CommandBar) like 'New Mail' (with a dropdown list) in Outlook?
When one clicks on the button it should do some action and when clicked on the down arrow mark, it should populate a list of items. I am in need of this very much.
If anyone know the answer pls let me know.
Thanks in advance!
-Pranav
Assuming Outlook<2007, you add a new button to the explorer/inspector via CommandBars.Add("foo", Type:=msoControlDropdown) and add entries to the drop-down via myDropdown.Add("bar").
See also the reference for CommandBarComboBox.
You can't populate it on click though, you have to find other suitable events for that, e.g. Explorer.SelectionChange.
On Outlook >= 2007 you need to customize the ribbon which is a bit more writing work. Customizing the Ribbon in Outlook 2007 is a good introduction into that.
To create a new mail item use myOlApplication.CreateItem(olMailItem) or myMailFolder.Items.Add(), set it up as needed and show it in an inspector via e.g. myMailItem.Display().
Sound like you are looking for a split button. Unfortunately the API does not expose that.
You can hack up a Popup under the button which is a poor attempt of a split button.

Resources