How to create an outlook extension using Visual Studio 2013? - c#

I need to create an outlook extension which should have a form with two buttons, and it should appear on the right side of the application, like how the todoist app does(red circled in the screenshot).
I tried creating using the "Outlook 2013 Add in" project type, I was able to create an add-in with some basic functionality, but did not know how do add a UI to it.
On little more googling, I found this, this looked like what I needed but didnt seem to be officially from microsoft/visual studio and appeared to be with some kind of fee too.
I am trying to make my first outlook extension.
Couldnt get any good results when I tried googling for the same, can anyone guide me in this ?

VSTO (nor Outlook) doesn't provide such layout for custom forms. However, you are free to use Windows API functions to subclass the Outlook window and inject your own forms. They call them as Adjacent Windows In Outlook. See the Creating Adjacent Windows In Outlook sample code.
Add-in Express uses the same technology for subclassing Outlook windows. As a result you get a convenient way to place .net controls on a Windows form. For example, I have just tested a sample add-in with an advanced Outlook form placed to the RightReadingPane layout. And here is what I get:

Related

Using Controls and Components of Visual Studio in my application

I'm currently trying to find out, if (also legally) I can use the components of Visual Studio in my applications. I don't mean the controls that are delivered to create my application, like a Button.
I mean the PropertyGrid, the Text Editor, etc, that VS also uses internally in the VS application itself.
The PropertyGrid would be especially interesting because the old winforms PropertyGrid can only be used with WindowsFormsHost, but using the old technolgy is also causing troubles when using windows with transparency, etc.
My questions are:
Am I allowed to do it?
Can you please provide me with an example of how to do that?

VSTO Ribbons and Interop

Is it possible to handle button click events on a custom ribbon button from another application using interop?
So if I've created a Word 2010 application add-in which creates a custom tab with several buttons and then I instantiate a Word application from a C# win forms application using interop, how would I then go about wiring up to the button click events on my custom ribbon from the win forms app? With Word 2003 I could access the buttons through the CommandBars collection and then simply wire up to the click event.
After some further reading, I guess what I'm trying to do is find out how to get access to the Ribbon object model using interop. Is this possible?
[Edit]
For anyone that's interested. When I wrote this question I knew of another way to solve my problem, but it means a lot of extra work changing my existing implementation to upgrade from Office 2003 to Office 2010, and so I was hoping there would be away to access the Ribbon object model outside of a VSTO add-in.
My solution is to use an IpcChannel to make calls from the vsto add-in to my win-forms application. So my win-forms application initialises the Word instance and then opens up a server channel. In the vsto add-in I handle Application.DocumentOpen and if the document is owned by my application I open a client channel to my application. I can then make calls back to my win-forms app from the vsto add-in through the use of shared interfaces.
While this technique works, it does have some draw backs. If the calls through the ipc channel are synchronous then my application can't touch the word object because a deadlock occurs. Making asynchronous calls introduces other problems, but I found that I could block the Word window with a modal dialog without ending up deadlocked.
While this isn't an exact answer to my original question, it is an alternative and so I thought I would share this with anyone else having this problem.
If anyone does know how to access the Ribbon object model outside of VSTO I would still be interested to know how.
Edit: I finally discovered a code.msdn.microsoft.com project that incorporates native C# ribbon manipulation. Use that instead of any VBA business.
Original Post:
You don't need VSTO to access the ribbon programmatically. Visit Word Articles for a brief Word VBA example.
I'm certain there's a way to accomplish the same in C#, but I have yet to implement one. If I find one, I will be certain to share. (I previously contributed an answer that contains a C#-VBA workaround.)

C# Control Name

I have two questions.
I am usinq Devexpress Winforms
What is the name of control of the
Visual studio toolbox.I wanna add a
control list like visual studi
toolbox.What is the name?
How can I add the flow chart to my
c# project?
For Dev Express, I would perhaps try something like the XtraNavBar:
Windows Side Bar Control
For a flow chart, I don't think Dev Express has a C# winforms flow chart right now.
See comments from Dev Express
#Deneme, The style of control that you see as the Visual Studio Toolbox is called 'an accordion control'. There is not one in the standard forms toolset, but it is not too difficult to build your own out of buttons & panels, and you can tailor it to your own needs and situation.
As for your second question about adding a flow chart, I am not aware of a single tool that you can drag and drop on to a form and set your users loose, but again, it should not be too difficult for you to create panels & buttons to create your own. Depending your needs you may be able to use some pieces of the Office Developers Toolkit to help you get there.

How to add 'quick steps' style control to Outlook 2010 Ribbon?

As part of my Outlook Addin I would like to add a control to the Ribbon which has the same format as the 'Home\Quick Steps' and 'View\Arrangement' controls. Does anyone know if these can be created by Addins?
These are variation of the in-ribbon gallery, you are currently not able to build ones yourself, you can only do drop down galleries. I believe that it has been request by alot of devs.
Marcus

Menu Contols like the Office 2007 Ribbon

Is there a way to my WinApp written in C# using Visual Studio 2008 have menu controls which look like on these We can fund in Office 2007.
Menu http://lh6.ggpht.com/_l7ldTfcnI34/S0wk1-eGSYI/AAAAAAAAEYU/IrTyYDV2Muo/s800/menus.jpg
Yes, you can get a free license to incorporate the Office 2007 user interface into your program.
http://msdn.microsoft.com/en-us/office/aa973809.aspx
You can't get a free control from microsoft, but there are a bunch of people who will sell you a version. DivElements.co.uk are one example (no affiliation).
Microsoft only have a version for C++ and for WPF, not for winforms.
Well, out of the box from VS.NET, the toolbar controls aren't anywhere near what you want in Office apps.
You can write your own custom ones or simply get 3rd party components.
E.g.:
http://www.devcomponents.com/dotnetbar/
http://www.componentone.com/SuperProducts/MenusandToolbarsWinForms/
etc etc
You can use the Telerik RadRibbonBar For WinForms by registering at this link below
http://www.microsoft.com/express/registration/
this provides you with a free ribbon bar control which you can use with C# in your application and can even distribute the applications without any royalities to Telerik.
Otherwise like stated in other answers you would need to buy some commericial toolkit like DevExpress etc.
Here it comes to WPF http://fluent.codeplex.com/

Categories