vsto

Excel 2013 VSTO Ribbon & Edit Controls

会有一股神秘感。 提交于 2019-12-03 15:22:29
The quick overview is I have an Excel AddIn targeting Excel 2013. The AddIn has a custom RibbonUI that contains a couple of read-only EditBoxes that contain workbook specific values. The same AddIn works fine in Excel 2007 & 2010, with the MDI interface, but with 2013 and its SDI interface. With a simple VSTO AddIn, I've added a simple RibbonUI with an EditBox. For testing purposes, I'm just trying to get the EditBox to reflect the Workbook.Fullname of the window in which it appears. Far as I've been able to find, the RibbonUI is a singleton and there's no apparent way to control the values of

Exposing .net methods as Excel functions?

笑着哭i 提交于 2019-12-03 15:10:55
I have a set of calculation methods sitting in a .Net DLL. I would like to make those methods available to Excel (2003+) users so they can use them in their spreadsheets. For example, my .net method: public double CalculateSomethingReallyComplex(double a, double b) {...} I would like enable them to call this method just by typing a formula in a random cell: =CalculateSomethingReallyComplex(A1, B1) What would be the best way to accomplish this? There are two methods - you can used Visual Studio Tools for Office (VSTO): http://blogs.msdn.com/pstubbs/archive/2004/12/31/344964.aspx or you can use

Outlook VSTO ribbon to home tabControlId

寵の児 提交于 2019-12-03 13:46:51
I'm writing a VSTO Microsoft Outlook plug-in. The version destination of that plugin is Outlook 2007 and 2010, so I use the Outlook 2007 add-in (in Visual Studio). I have some (visual) problem with ActiveMenuBar. In Outlook 2007 it works fine, but in 2010 the ActiveMenuBar doesn't exist; it is replaced with tabControl and ribbons. I would like to check the version ( Application.Version ) and if the version is 14 (Outlook 2010) then don't add an item into ActiveMenuBar, but add a ribbon to the Home tabPage. How do I add the Ribbon into the Home tab page? For example, if I add a ribbon to the

How to get current or focussed cell value in Excel worksheet using C#

巧了我就是萌 提交于 2019-12-03 13:34:41
Please help me through a C# code that in VSTO Excel. Wherever I selected a cell the respective column gets focused, I need to get the Column value (column) and Row value(row no) on excel worksheet wherever I focus. How can I do the same through code? How do I get the focused or current cell's column value in VSTO excel using C#? Also, I would like to learn VSTO Excel using C# so some good free/downloadable ebooks and/or any web links suggestions are welcomed. Excel.Range rng = (Excel.Range) this.Application.ActiveCell; //get the cell value object cellValue = rng.Value; //get the row and column

Adding buttons to spreadsheets in .NET (VSTO)

北战南征 提交于 2019-12-03 12:37:11
Using VSTO or some related technology, is it possible to programmatically embed a button in a cell of an Excel worksheet, and configure it to call a C# function when it is clicked? How? Thanks. With a VSTO document customization (i.e., a Workbook with .Net code attached), you can add and remove controls at runtime to the Worksheets of the project. The following code illustrates the idea: public partial class Sheet1 { private void Sheet1_Startup(object sender, System.EventArgs e) { var button = this.Controls.AddButton(10, 10, 50, 50, "My Button"); button.Text = "My Button"; button.Click += new

VSTO Outlook addin need to save settings, best way?

ε祈祈猫儿з 提交于 2019-12-03 10:51:59
问题 I'm writing a VSTO Outlook add in and i need to save some settings the addin gets from a web service. What is the best way to do this. Registry? does the VSTO addin have full access to do something like that? Maybe a file containing the settings? Thanks in advance. 回答1: You can use a Settings (.settings) file. The advantage of this file, besides having a centralized and strongly-typed repository, is that you can make these settings either application -scoped or user -scoped. Application

Creating a multi-level bullet list with Word.Interop

半世苍凉 提交于 2019-12-03 08:52:54
I need to create a multi-level bullet list via Microsoft.Office.Interop.Word and I am currently struggling with its (horrible) API (again). I've just created the following example (not dynamic yet, just for demonstration purposes) in a VSTO document-level project for Microsoft Office Word 2010 in the programming language C#: Word.Paragraph paragraph = null; Word.Range range = this.Content; paragraph = range.Paragraphs.Add(); paragraph.Range.Text = "Item 1"; paragraph.Range.ListFormat.ApplyBulletDefault(Word.WdDefaultListBehavior.wdWord10ListBehavior); // ATTENTION: We have to outdent the

Can an excel VSTO add-in be compatible with excel 2007 and 2010?

天涯浪子 提交于 2019-12-03 06:25:32
问题 Is it possible to develop an excel add-in using VSTO that can be deployed to both excel 2007 and 2010? Any links to a detailed resource on this topic would also be appreciated - I can't seem to find anything on google that specifically addresses this question. I am developing a C# excel add-in using Visual Studio 2010. 回答1: I already answered this for Word, but it also applies to Excel: If you want to deploy to Office 2010 AND 2007, you have to add references to the v12.0 assemblies (

Is it possible to create an Office 2003 VSTO add-in from Visual Studio 2010?

巧了我就是萌 提交于 2019-12-03 06:14:07
We have existing VS 2008 VSTO add-ins for Word 2003 and Excel 2003. We are unable to upgrade the Office version at this time. We have just tried to upgrade our solution to VS 2010 and it converts and compiles fine, but when building and running the add-in we receive a message saying that the required version of Office is not installed. Is there any way of getting around this issue (without upgrading to Office 2007 or 2010) so that we can use VS 2010 to build this add-in? No, unfortunately it's not possible. VSTO 2010 will not compile solutions designed for Office 2003. It is designed to work

VBA VS. VSTO what is the difference, should I upgrade?

我怕爱的太早我们不能终老 提交于 2019-12-03 04:38:57
I am a huge fan of the KISS principle (Keep it simple) and a long time VBA for excel user. However all the articles I can find on VBA vs. VSTO (Visual Studio Tools for Office) seem very complicated. Firstly, I am sick of the very poor IDE built into Excel and I am looking for a new one. VSTO using Visual Studio as the IDE seems to be the only alternative. So I seek to understand what is the difference between VBA and VSTO to know if it is worth me learning to use VSTO? Which toolset you use is largely a matter of personal preference, but here are some things to consider: 1. Performance: For