vsto

Edit Excel Spreadsheet object in word document (C# Interop)

送分小仙女□ 提交于 2019-12-14 01:56:15
问题 I am currently trying to edit cells of an excel spreadsheet object with c# interop. I inserted it in a word document as an object. Until there i didn't succeed to programm anything that really works. I'm able to select the component but i can't open it to edition and then reach grid's cells. I use a button control in a custom office ribbon to launch edit. Here is my method: public void EditTable(Office.IRibbonControl control) { Word.Application oWordApp = (Word.Application)Marshal

What is minimum Version support to Ms Office of VSTO Add-In created in VS 2013?

非 Y 不嫁゛ 提交于 2019-12-13 23:38:09
问题 I want to create a Add-In. I will create in VS 2013. I just don't know what is minimum version support of Ms Office. Can anybody please suggest me? So, I can take case of the requirement. 回答1: VS2013 will natively support 2010 and 2013, but it is possible to support 2007 as well. Per Microsoft's article on running solutions in different version's of Office: If you developed solutions for Office 2010, you can run the same solutions in Microsoft Office 2013. If your customer base uses the 2007

How to debug hanging SaveFileDialog

女生的网名这么多〃 提交于 2019-12-13 23:12:15
问题 Several users of my VSTO add-ins report hangs that occur when a "Save as" dialog should be displayed. This happens with an Excel add-in as well as a Word add-in. Interestingly, both applications also tend to hang when invoking the "Save as" command on a document. I am having a hard time to troubleshoot this because the entire application just freezes after // using System.Windows.Forms; SaveFileDialog dlg = new SaveFileDialog(); // lines to configure dlg left out dlg.ShowDialog(); When

how to deduce the slide ppt position of a shape from the screen position of the mouse

杀马特。学长 韩版系。学妹 提交于 2019-12-13 21:27:20
问题 I'm using VB to implement a custom task pane for Powerpoint. I would like to display an image shape on the active powerpoint slide at the position of the mouse. I know screen position of the mouse by using " System.windows.froms.control.MousePosition.Y " .. So now it would be great to transform it into slide ppt position and fill the property "shape.top". I tried the function "screentoclient" but it doesn't work. What is the unit of shape.top on ppt slide? what is the unit of mouse's screen

How to get the document-level templates into Visual Studio Tools for Office (VSTO)

流过昼夜 提交于 2019-12-13 17:24:45
问题 "To summarize: if you install VSTO 2005 SE on top of a clean VS 2005 Professional, you won't have the document-level templates. If you want to have them you need to have VS 2005 Team Suite/Team Edition or you need to install the previous version of VSTO: VSTO 2005. So VS 2005 Professional + VSTO 2005 + VSTO 2005 SE will give you the document-level templates!" So my question is, does anyone have a link to a VSTO 2005 download (it is no longer available from Microsoft). 回答1: http://social.msdn

Application.COMAddIns Subscript out of range

送分小仙女□ 提交于 2019-12-13 16:14:55
问题 Following the sample case below https://msdn.microsoft.com/en-us/library/bb608614.aspx?cs-save-lang=1&cs-lang=csharp#code-snippet-1 Run into a 'Subscript out of range' in Set addIn = Application.COMAddIns("ExcelImportData") New to VSTO and C#. How do I debug this? 回答1: If the add-in subscript is out of Range, it suggests that you've either made a typo in the name of the add-in while creating the VSTO project, or you've failed to open Excel using the debugger (which automatically loads the add

Invalid provider type specified error in code signing the vsto outlook application

三世轮回 提交于 2019-12-13 15:03:39
问题 I brought a code signing certificate from GoDaddy generated a .pfx file from it. But when I use this file to code sign the clickonce manifest of my outlook vsto application I get this error in visual studio An error occurred while signing: Invalid provider type specified. What could be the problem here? Thanks. 回答1: The signing identity stored in the .pfx container are most likely older "Cryptographic Service Providers" (CSP) style. The environment you are using to sign your package looks

How to add additional worksheets to an Excel from DataTable

南笙酒味 提交于 2019-12-13 14:47:10
问题 I'm trying to create an excel report that has multiple sheets. each of these sheets has data that comes from a DataTable that results from a SQL query. The inital worksheet is created correctly, however, i'm unable to create the second worksheet. I understand what i'm doing wrong, but i'm just not sure how to add a worksheet using the below code without creating a new excel workbook everything. I was thinking about just creating the workbook and then just adding sheets. But I cant seem to

SpecialCells in VSTO

こ雲淡風輕ζ 提交于 2019-12-13 14:31:10
问题 I'm trying to use the SpecialCells method in a VSTO project using c# against the 3.5 framework and Excel2007. Here's my code: Excel.Worksheet myWs = (Excel.Worksheet)ModelWb.Worksheets[1]; Range myRange = myWs.get_Range("A7", "A800"); //Range rAccounts = myRange.SpecialCells(XlCellType.xlCellTypeConstants, XlSpecialCellsValue.xlTextValues); Range rAccounts = myWs.Cells.SpecialCells(XlCellType.xlCellTypeConstants, XlSpecialCellsValue.xlTextValues); When I run this, it throws an exception...

Shutdown event is not always fired when Saving a Word document during BeforeClose event

只谈情不闲聊 提交于 2019-12-13 14:26:45
问题 I have a Microsoft Word Add-in using VSTO and c# . For each document, I am using the document ShutDown event to do cleanup of my parent object and the BeforeClose event for pre-close validation of my parent object. My validation needs the document to be saved and tries to do that in the BeforeClose event. If the document has never been saved before, the Save As dialog appears. If the user clicks Cancel a COMException is thrown and I catch that properly. Then the Save/Don't Save/Cancel dialog