vsto

Get selected item's tag of Ribbon ComboBox control in VSTO (VB.Net)

与世无争的帅哥 提交于 2019-12-11 05:14:10
问题 I have a code to list time entry (In Time, Out Time, Comments, Employee Name) information for all the employees from SQL in Excel 2010 using Excel Add-In project. Here, I wanted to move step ahead to list time entry information for selected employee from the ComboBox control (which holds the employee name and employee id in label and tag properties respectively) place in Excel Ribbon using Excel Add-In. Here, I was unable to get the selected employee's tag (Id) from ComboBox that I have added

Inserting symbols into text in PowerPoint 2007 using VBA

半世苍凉 提交于 2019-12-11 05:07:37
问题 I need to append programmatically (VBA/VSTO) several special symbols (e.g., smileys) into text in a TextRange in PowerPoint 2007. I can insert a symbol using: With ActiveWindow.Selection.TextRange .Text = "sometext" Call .Characters(.Characters.Count + 1).InsertSymbol("Arial", 65, MsoTriState.msoTrue) End With Unfortunately, when I try to insert several symbols one after the other with different fonts, only the last one shows correctly and the previous ones show like empty squares. How can I

Enabling PowerPoint VSTO add-in by default

天涯浪子 提交于 2019-12-11 04:51:36
问题 When I install my VSTO-based PowerPoint plugin, it always shows up in the 'disabled' section and everytime I open PowerPoint - I have to manually enable it. How do I programmatically change this behaviour such that plugin is always enabled by default. 回答1: When you set an Office (VSTO) addin to be enabled (in Office), it changes the registry key: HKLM\SOFTWARE\Microsoft\Office\PowerPoint\Addins\YourAssemblyName "LoadBehavior" The LoadBehavior value must be set to 3 to load (ie enabled) (2 is

Set text value using SharedStringTable with xml sdk in .net

南楼画角 提交于 2019-12-11 04:48:17
问题 I have a piece of code (below) that can get the text of an specific cell in excel, but I don't know how to modify this text to change the cell text. public static void UpdateTextCell(string docName, string text, uint rowIndex, string columnName, string sheetName) { // Open the document for editing. using (SpreadsheetDocument spreadSheet = SpreadsheetDocument .Open(docName, true)) { WorksheetPart worksheetPart = GetWorksheetPartByName(spreadSheet, sheetName); if (worksheetPart != null) {

Embed Cefsharp browser in Custom Task Pane for Excel

落爺英雄遲暮 提交于 2019-12-11 04:44:45
问题 As the headline suggests, what I'm trying to do is to embed a Cefsharp Chromium browser in a VSTO Custom Task Pane (CTP) for Excel. I have tested the Cefsharp browser in a standard Windows form and it works beautifully. And I'm using this code for the CTP, and that also works without problems. The problem arise when I try to combine them. Then I get an 'System.IO.FileNotFoundException' error stating that 'CefSharp.Core.DLL' could not be read. My CTP startup-function loos like this: Private

how do I mark a file as a data file in a visual studio 2010 vsto clickonce application?

馋奶兔 提交于 2019-12-11 04:29:32
问题 I'm making a Word 2007 add-in with C# 4.0 in Visual Studio 2010. I need an Access 2007 database (a .accdb file) to be placed in the data directory by the clickonce installer. Unfortunately, the file is getting put elsewhere, so the application can't find it at runtime. I've seen various articles refer to using the Application Files dialog on the Publish tab of the project properties to mark the file as a data file, but I have no Application Files button for some reason. Any idea how to make

How to create Excel 2003 UDF with a C# Excel add-in using VSTO 2005 SE

大憨熊 提交于 2019-12-11 04:16:35
问题 I saw an article on creating Excel UDFs in VSTO managed code, using VBA: http://blogs.msdn.com/pstubbs/archive/2004/12/31/344964.aspx. However I want to get this working in a C# Excel add-in using VSTO 2005 SE, can any one help? I tried the technique Romain pointed out but when trying to load Excel I get the following exception: The customization assembly could not be found or could not be loaded. You can still edit and save the document..... Details: Type mismatch. (Exception from HRESULT:

Extract OLE object data in Microsoft Office without OLE application

倖福魔咒の 提交于 2019-12-11 04:02:05
问题 Is it possible to extract the content of an embedded OLE object in Microsoft Office using VBA/VSTO? I am talking about a situation where the application with which the OLE object was created is not available. In this case some sort of converter application could make use of the raw data. For instance, in Excel the object is accessible via ActiveSheet.Shapes(x).OLEFormat but I have not found a way to retrieve the raw data of the object. One way would be to open the native file (Office Open XML

Cannot debug VSTO addin on terminal server

拜拜、爱过 提交于 2019-12-11 03:38:30
问题 Our development team mostly works on the same terminal server. We are working on an Outlook VSTO 2010 addin. We just migrated from "Visual Studio 2008/Office 2003/VSTO 2005" to "Visual Studio 2010/Office 2010/VSTO 2010". Attempting to debug the Add-In from Visual Studio results in the following error if any other user is running Outlook on the server: Cannot debug the add-in because 'Outlook' is already running. Close 'Outlook' and then run the project again. Before the software update, each

Getting Cells with Formulas in Excel file

拟墨画扇 提交于 2019-12-11 02:54:01
问题 I am trying to read formulas of cells currently I am reading all cells in sheet which takes too much time. How can I only select those cells which have formulas. Here is the code I am using foreach (Excel.Worksheet workSht in xWorkBook.Worksheets) { for (int rCnt = 1; rCnt <= workSht .Rows.Count; rCnt++) { for (int cCnt = 1; cCnt <= workSht .Columns.Count; cCnt++) { string str = (string)(workSht.Cells[rCnt, cCnt] as Excel.Range).Formula; if (str.Contains("_R*")) { if (File.Exists