vsto

Outlook Add-in, RibbonType Microsoft.Outlook.Explorer and Microsoft.Outlook.Mail.Read

耗尽温柔 提交于 2020-01-23 01:18:07
问题 I have an Outlook 2010 Add-in coded in .NET 4.0/VS.NET 2010, C#. The Add-in extends the Ribbon => it adds a RibbonTab with 4 RibbonButtons to ( RibbonType Property is set to) Microsoft.Outlook.Explorer and Microsoft.Outlook.Mail.Read . Now, if the user clicks on one of the RibbonButtons, how can i determine if the user clicked on the button which is added to the Microsoft.Outlook.Explorer OR Microsoft.Outlook.Mail.Read ? 回答1: One option is to create (2) Ribbons with a shared capability

Conditional Formatting in Excel with C#

不羁岁月 提交于 2020-01-22 20:15:35
问题 I need to apply a color to a cell's text if the value is not same as a value in another column. What would be the best approach for it ? The way I can think of is quite expensive. for (int i = 0; i < ColumnARange.Cells.Count; i++) { if (ColumnARange.Cells[i, 1] != ColumnBRange.Cells[i, 1]) { Range currCell = ColumnBRange.Cells[i, 1]; currCell.Font.Color = System.Drawing.ColorTranslator.ToOle(System.Drawing.Color.Red); } } Tried conditional formatting as below, but in vain. FormatCondition

VSTO problem - cannot create visual studio excel workbook project

自作多情 提交于 2020-01-22 10:08:06
问题 When I try to create a Excel 2007 Workbook project, in Visual Studio 2008, I get the following errormessage: Project cannot be created because the "Excel Visual Studio Design-Time Adaptor Add-in" is not working correctly. Excel might have disabled the add-in or made it inactive, or all add-ins might be disabled in your Trust Center settings. Check the add-in status in Excel Options. If the add-in is active and enabled, reinstall or repair Visual Studio Tools for Office. I have verified that

Intermittent Error (System.TypeInitializationException: Type constructor threw an exception ) passing data to word addin from wpf app

我的未来我决定 提交于 2020-01-17 08:30:33
问题 WE have a WPF application which will launch a word and then pass some information to a VSTO Application addin. I have written the code as has been explained here We defined the interface and the implemtation as follows [ComVisible(true)] [Guid("B523844E-1A41-4118-A0F0-FDFA7BCD77C9")] [InterfaceType(ComInterfaceType.InterfaceIsDual)] public interface IBridge { /// <summary> /// Loads a task /// </summary> /// <returns> </returns> string Load(SomeDTO dataTransferObject); } [ComVisible(true)]

Adding a button to a 3rd party ribbon tab addin

痞子三分冷 提交于 2020-01-17 03:50:34
问题 I have a 3rd party addin in word 2010 and do not have access to the source code. The addin adds a new ribbon tab and many groups in the ribbon tab generated by the 3rd party addin. I understand how to use vb2013 to create my own new ribbon tab etc. My question is, is it possible for me a create a new word 2010 addin, which somehow gets a handle on the 3rd party addin's ribbon tab and adds a button to one of the groups within the 3rd parties ribbon tab? So basically, if the 3rd party addin is

Does this .NET tool/utility exist? [closed]

瘦欲@ 提交于 2020-01-16 20:39:06
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . When I generate a Class Diagram using VS2008, say for a C# file XYZ.cs - I get a Class Diagram detailing all the Fields,Properties,Methods and Nested Types. Is there a tool/utility, which will do the same for all the internal Class/Interface references I have used within this file. For eg. I have a Property of

Keep Microsoft Word from adding files opened programmatically to its History

折月煮酒 提交于 2020-01-16 18:41:09
问题 I have a .NET program that opens a file programmatically in word to modify it. Unfortunately, Microsoft word keeps the times the file was opened in word in its History, even though I don't want that to happen when the file is opened programmatically. How can I keep this from happening in .NET? 回答1: If you are using Documents.Open or SaveAs you can set the AddToRecentFiles property like this: Open: Globals.ThisAddIn.Application.Documents.Open("filename", AddToRecentFiles: false); Save as:

In my VSTO outlook app, why does calling SelectNamesDialog.Display() moves my form behind Outlook?

隐身守侯 提交于 2020-01-16 18:41:06
问题 I have an outlook VSTO app. I am trying to call the SeletNamesDialog from a form that i load. The dialog comes up which is great and its modal which is fine but it seems to move my form behind the outlook app. So after I select a bunch of names and click ok, the dialog disappears but my form is not visible unless i minimize outlook (which is obviously not ideal). Is there anyway to avoid this happening?. Here is the code i am using to load the dialog: var app = new Application(); AddressList

In my VSTO outlook app, why does calling SelectNamesDialog.Display() moves my form behind Outlook?

雨燕双飞 提交于 2020-01-16 18:38:01
问题 I have an outlook VSTO app. I am trying to call the SeletNamesDialog from a form that i load. The dialog comes up which is great and its modal which is fine but it seems to move my form behind the outlook app. So after I select a bunch of names and click ok, the dialog disappears but my form is not visible unless i minimize outlook (which is obviously not ideal). Is there anyway to avoid this happening?. Here is the code i am using to load the dialog: var app = new Application(); AddressList

How to programmatically set registry setting to prevent Outlook from removing the VSTO Addin

北战南征 提交于 2020-01-16 09:08:05
问题 Hi is there a way to programatically set the following registry key: HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Outlook\Resiliency\DoNotDisableAddinList\ with DWORD= 1 As I learned from this posting (among many others) this prevents Outlook from removing my Addin from Outlook for being slow. Yes, it would be better to design the AddIn for being faster. But as it needs to connect service on the internet this will be hard to achieve. BTW: I have this problem also with many other Addins.