0
votes

So my problem, I need to create a button in my outlook mail, when a user click on that button i need to show one windows form, there user can select a account number from dropdown AND the user can select the folder from a tree view, based on the selection, the selected mail should go and save there with the attachments if any.

so this is i need to acheive

to achieve the above, i started with creating Office Outlook Vsto Addin template in Visual studio 2015. And using the ribbon.xml i was able to show the button in ribbon area, but what i need to do is to show this button in each mail body. So once the user done reading the mail, they can directly click on that button, that will show my windows form.

So using that form user can select account number and the desired folder to which the selected mail need to save. Once we click OK button, the mail should go and save with the attachments if any in the selected folder.

How do i code to achieve this?

1

1 Answers

0
votes

If your addin already runs and you see it in the main ribbon in Outlook, please try the following steps to add the new section to individual message ribbons:

Open a message in Outlook. Right click in a clear space on the individual message ribbon. Choose Customize Ribbon. The ribbon Editor window opens. (You can also get here under File, Options, Customize Ribbon). On the right, under 'Customize the Ribbon', choose All Tabs. To make a new section on the Ribbon, Choose New Tab. To make a new section in the current Tab, Choose New Group.

Once you have the new Tab or Tab and Group you can choose commands from 'All Commands' on the left. Your addin should show up on the left when you choose commands from 'All Commands' Select your commands from the left, then click add to add the command to your new Tab or new group.

Click OK to save your changes. Your new tab, group and command will be visible on each message window.

You can export this customization in the same Customize Ribbon screen in the bottom right, under Customizations: Import /Export.