vsto

Is it possible to have more than one custom tab for the office ribbon?

好久不见. 提交于 2020-05-11 06:30:07
问题 I can not find any documentation to verify this or any working examples I want to achieve something like this xml below, but I think this really is not possible. <customUI onLoad="Ribbon_Load" xmlns="http://schemas.microsoft.com/office/2010/01/customui"> <ribbon> <tabs> <tab idMso="TabAddIns" label="Ribbon1"> </tab> <tab idMso="TabAddIns" label="Ribbon2"> </tab> </tabs> </ribbon> </customUI> 回答1: You can have multiple tabs, if you are using exiting tabs then set idMso="exiting tabids"

Microsoft Office VSTO addin: How to access ribbon xml controls from ThisAddIn class

梦想与她 提交于 2020-04-29 03:49:28
问题 In my VS2019 VSTO project for WORD AddIn , I have created button in a tab by using Ribbon XML as follows. And VS2019 auto-generated the ThisAddIn.cs class shown below. Question : How can I programmatically access the button control btnButton of Ribbon XML from ThisAddIn.cs class? Remark : There are some officials such as this one that shows how to do it for a Ribbon Designer . But, I need to do it for Ribbon XML . Ribbon1.XML : <ribbon> <tabs> <tab id="TabID" label="TEST"> <group id="MyGroup"

Outlook Addin: Moving Appointment in Calendar does not reflect new date/time in AppointmentItem (catch Calendar.ItemChange)

青春壹個敷衍的年華 提交于 2020-04-18 07:14:29
问题 i am trying to develop an Outlook Addin which updates a web services whenevery the ser moves an appointment (with drag and drop) in his calendar. In my VSTO based Outlook Addin (in Outlook 2016) my Item_Change gets fired when the user moves the calendar item around. But when I inspect the AppointmentItem which I get as a parameter of the call to public void Item_Change(Object item) { Outlook.AppointmentItem myAppointment = item as Outlook.AppointmentItem; the myAppointment.StartUTC still

Ready event in Microsoft Outlook 2010?

ぐ巨炮叔叔 提交于 2020-02-07 07:47:50
问题 Is there an event in Microsoft Outlook 2010 which one can subscribe on, in order to known when Outlook has finished initializing and all components, folders etc. have been loaded? 回答1: Not sure about VSTO but good ol' COM addins get the StartupComplete "event" (via IDTExtensibility2 ) for exactly that purpose. 回答2: Ok, I found out what I needed to do... ... private void ThisAddInStartup(object sender, EventArgs e) { this.Application.Startup += ApplicationStartup; this.Application.ItemLoad +=

How to update Publisher from None to XYZ in VSTO C# Excel 2013 Add-in?

ぐ巨炮叔叔 提交于 2020-02-05 07:53:12
问题 I have created one Excel 2013 add-ins project using vs2012 vsto with c#. I have set Publisher name to XXXXXXX-XXXXX-XXXX Inc. Also I have also added digital signature of my company with same Publisher name to XXXXXXX-XXXXX-XXXX Inc. At the time of installation always I get publisher name XXXXXXX-XXXXX-XXXX Inc. But after installed if I am open Excel's options then Publisher display None So, please guide me how to update/add publisher name. I have also updated Publish Options but I am not get

Windows Forms and High DPI Screens

末鹿安然 提交于 2020-02-04 04:49:23
问题 I have an Outlook Add In called TMO (http://gotmo.co.uk) which has a Windows Form that is opened on the click of the Help Button in the Outlook toolbar. The problem is that when I use TMO on High DPI Screens such as Surface Pro the form renders very convoluted (see screenshot). However on other laptops the form renders correctly. In fact if I run a test app on Surface Pro from where I load the same form it renders correctly. See the attached screenshots. From my reading so far Windows Forms

How to get CustomDocumentProperties using Excel Interop?

自闭症网瘾萝莉.ら 提交于 2020-02-02 06:48:29
问题 The below code is used to get the custom document properties for Excel workbook. var xlApp = Globals.ThisAddIn.Application; // This works in VSTO Excel Add-in var xlApp = new global::Microsoft.Office.Interop.Excel.Application(); // This doesn't work anywhere xlApp.Visible = true; global::Microsoft.Office.Interop.Excel.Workbook workbook = xlApp.Workbooks.Open(file, false, true, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type

How to get CustomDocumentProperties using Excel Interop?

烂漫一生 提交于 2020-02-02 06:48:10
问题 The below code is used to get the custom document properties for Excel workbook. var xlApp = Globals.ThisAddIn.Application; // This works in VSTO Excel Add-in var xlApp = new global::Microsoft.Office.Interop.Excel.Application(); // This doesn't work anywhere xlApp.Visible = true; global::Microsoft.Office.Interop.Excel.Workbook workbook = xlApp.Workbooks.Open(file, false, true, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type

Is there any way to change border/header background in VSTO outlook add in?

风格不统一 提交于 2020-01-30 08:13:45
问题 I'm developing a VSTO plugin for Outlook 2016 but am not able to change the border and header background color (as you can see from the linked image). I tried to force the "BackColor" property of the TaskPaneWpfControlHost object but what happens is that I get the background change of the user control injected into the container. public TaskPaneWpfControlHost(System.Windows.Controls.UserControl shell) { this.BackColor = System.Drawing.Color.White; InitializeComponent(); wpfElementHost

VSTO Outlook ItemSend with C#

跟風遠走 提交于 2020-01-30 04:28:48
问题 I'm trying to add a string in the end of an Outlook email's body with VSTO private void ThisAddIn_Startup(object sender, System.EventArgs e) { this.Application.ItemSend += new Microsoft.Office.Interop.Outlook.ApplicationEvents_11_ItemSendEventHandler(Application_ItemSend); } void Application_ItemSend(object Item, ref bool Cancel) { if (Item is Outlook.MailItem) { Outlook.MailItem mail = (Outlook.MailItem)Item; mail.BodyFormat = Microsoft.Office.Interop.Outlook.OlBodyFormat.olFormatHTML; mail