vsto

VSTO Ribbon gallery that looks like the Style Selector in Word 2010

孤者浪人 提交于 2019-12-23 20:15:03
问题 I'm coding a Ribbon COM-add-in in C# and try to create a gallery of avaiable template files on a new tab. Is it possible to set the gallery to open like the Style Selector gallery on the home tab in word ie. showing all the filenames in the gallery? 回答1: MS does not allow others to use an In-Ribbon Gallery in Outlook 2007->2013. Maybe we will see it in Outlook 2015/2016. Take a look at the MSDN Code Samples to see what Ribbon XML controls are available. The closest you can come is using the

Save Word to UTF-8 Encoded HTML

痞子三分冷 提交于 2019-12-23 19:43:13
问题 I am writing some C# VSTO code that reads a Microsoft Word document and saves it to Filtered HTML. When I perform this function on a generic Word document, the output of the html file uses a Windows Charset as witnessed here: <meta http-equiv=Content-Type content="text/html; charset=windows-1252"> If I open a document and go to File->Options->Advanced->Web Options, I can choose UTF8, and the resulting filtered html document output looks like this: <meta http-equiv=Content-Type content="text

Excel 2007 VSTO plugin exception when setting Font.Color

会有一股神秘感。 提交于 2019-12-23 18:55:31
问题 I am working on an Excel 2007 VSTO plugin that is throwing COM exceptions on the client but not when debugging on my development machine. What the plugin does is capture Excel's Startup event, define a specialized style, then add an event handler to the SheetChange event. Anytime a value is changed in the sheet, the cell is set to the new style. All of this is to provide users a way to see the cells they've changed. Code is as follows: private void ThisWorkbook_Startup(object sender, System

Correlate Range.Text to Range.Start and Range.End

依然范特西╮ 提交于 2019-12-23 17:52:56
问题 I'm using regular expressions to search against the plain text returned by the following property: namespace Microsoft.Office.Interop.Word { public class Range { ... public string Text { get; set; } ... } } Based upon the matches I want to make changes to the formatted text that corresponds to the plain text. The problem I have is that the indices of characters in the .Text property do not match up with the .Start and .End properties of the Range object. Does anyone know any way to match

How to detect if filter(s) changed on a worksheet?

六月ゝ 毕业季﹏ 提交于 2019-12-23 12:29:32
问题 In excel workbook project, how could we detect if the filters on some worksheet are updated? 回答1: Make sure that you have a formula (e.g. COUNT ) that includes an entire column of the data. In the case of a Table , turn on the Total row. When the filter is changed, the Excel calculation event will fire because of the formula and you can pick this up by inserting the following code into the sheet. Private Sub Worksheet_Calculate() MsgBox "Calculation" End Sub Your sheet will need to be

Excel VSTO Addin showing/hiding taskpane

∥☆過路亽.° 提交于 2019-12-23 12:26:20
问题 I do the tutorial here. Everything works fine with a blank excel page https://msdn.microsoft.com/en-us/library/bb608590(v=vs.120).aspx When I load up a excel sheet someone gave me and go to click the toggleButton1 to show the pane I get {"The taskpane has been deleted or is otherwise no longer valid."} on the line private void toggleButton1_Click(object sender, RibbonControlEventArgs e) { Globals.ThisAddIn.TaskPane.Visible = ((RibbonToggleButton)sender).Checked; } Is a pointer to that task

Speed Up Working With Comments in Excel VBA

守給你的承諾、 提交于 2019-12-23 12:13:09
问题 This is an example I contrived, I created this to explain the problem I'm having. Basically I want this code to run faster than it does. On a new sheet each loop of a cell starts fast, but if you let it run to near completion, and then run it again, it will hit 100ms per cell. In my sheet I have 16000 cells with a lot of comments like this, and they are manipulated individually every time the code runs. In this example they are obviously all the same, but in the real application each one is

This addin caused outlook to start slowly

為{幸葍}努か 提交于 2019-12-23 10:55:13
问题 I am developing an Outlook Addin Project using C#.NET 4.5 But After I deploy, Sometimes outlook disables my addin, and shows this message. "This addin caused outlook to start slowly"" I dont know whats wrong with my addin. This has only a few codes, and ThisAddIn_Startup is empty in this project. Here is the code... public partial class ThisAddIn { private void ThisAddIn_Startup(object sender, System.EventArgs e) { } private void ThisAddIn_Shutdown(object sender, System.EventArgs e) { }

ClickOnce error after deploying — has a different computed hash than specified in manifest

丶灬走出姿态 提交于 2019-12-23 08:28:54
问题 Afer deploying my VSTO add-in with ClickOnce, I get the following error message when trying to launch setup.exe: File, Addin.resources.dll, has a different computed hash than specified in manifest. Why is this happening? What can I do to fix this? 回答1: I was able to resolve this just by doing a clean build and publish. For some reason the manifest wasn't updated like it was supposed to. 回答2: I'm using Visual Studio 2013 SP2, and am having the same issue. Regularly, I will create a new release

Cannot store and retrieve custom ItemProperties from AppointmentItem in case it is a recurring AppointmentItem

跟風遠走 提交于 2019-12-23 05:06:16
问题 I want to add some custom properties on an AppointmentItem. This works perfectly for "normal" AppointmentItems. Example: myAppointment.ItemProperties.Add("MyId", Outlook.OlUserPropertyType.olText, false, 1); MyId = (Outlook.UserProperty)myAppointment.ItemProperties["MyId"]; MyId.Value = myMeeting.id; meetingId = myMeeting.id; myAppointment.Save(); Even when I restart Outlook I can fetch those properties from the AppointmentItem like that: MyId = (Outlook.UserProperty)theCurrentAppointment