vsto

VSTO adding menu item to Excel 2003 with C#

Hi there, I'm developing an Excel 2003 add-on and trying to make my own menu like so: Application.ScreenUpdating = true; Application.MenuBars.Add("MyMenu"); Application.MenuBars["MyMenu"].Menus.Add("MyMenuItem1", null, null); It seems to run just fine but I can't see my menu at all. any ideas why? ...

VSTO CommandBarButton position

I'm writing a VSTO add-in to add a button the Standard toolbar for all new MailItems in Outlook 2003. I've got it mostly finished, but I can't see to work out how to set the button's position on the taskbar - ideally I'd like to place it right next to the Send button. Here's the code I have so far. Private Sub colInsp_NewInspector(By...

VSTO: Pasting multiple sections to a Word doc generates phantom macros

I have some VSTO code which generates a Word 2003 document by copying and pasting selected sections from a source document: Dim doc = Globals.ThisDocument.Application.Documents.Add(DocumentType:=Word.WdNewDocumentType.wdNewBlankDocument, Visible:=False) For Each sectionNumber As Integer In requiredSections sourceDoc.Sect...

VSTO 2007: how do I determine the page and paragraph number of a Range?

I'm building an MS Word add-in that has to gather all comment balloons from a document and summarize them in a list. My result will be a list of ReviewItem classes containing the Comment itself, the paragraph number and the page number on which the commented text resides. Part of my code looks like this: private static List<Review...

VSTO Infopath Form Security Problem

I have a VS2008 project - an Office 2007 InfoPath form customization with a little code behind. I've run the publish wizard to create an msi install. It's just going to be used by fellow developers (deployment template) who have all the base components already installed (framework, VSTO runtime). I've read all the security documentati...

Creating UDF with VSTO in Excel

Hi there, I know how I can do this for the simple case as details here: http://geekswithblogs.net/Denis/archive/2007/01/03/102623.aspx But what I'm trying to do is when my category is selected in Excel I want to be able to dynamically populate the function list at run-time. As is, it's populated using all public function in the catego...

VSTO, UDF: Accessing the function list programmatically

Hi there, Is there any way of programmatically accessing the Excel Fucntion list of a UDF so I can dynamically add more enteries to it? ...

VSTO and Outlook 2003 Context menus

Hi Guys, I want to have outlook 2003/2007 integration with my application using VSTO. with outlook 2007 it's OK - i have all the hooks i need but with outlook 2003 i can't find how to add conext menu item to the mail items in the inbox. I didn't find any event handler for populating the context menu like the one in the 2007 version. D...

how to handle the PowerPoint closing event programatically in Office Com Add-ins?

I am using Shared Add-in for office plug-ins. Can anyone tell me how to handle closing event ( [X] button of my window) programatically in Office COM Add-ins for POWER POINT. Thanks in advance ...

In Visual Studio, can I disable signing my application when in debug?

In Visual Studio's Project Properties -> Signing tab, I have signed my project with a code-signing certificate. On my team, however, I'm the only one with the code-signing certificate, even though we're in a multiple-developer environment. When the other developers try to "Start Debugging", they get the following message: "cannot find t...

Excel error HRESULT: 0x800A03EC while trying to get range with cell's name

I am working with Window Service project. that have to write data to a sheet in Excel file in a sequence times. But sometimes, just sometimes, the service throw out the exception "Exception from HRESULT: 0x800A03EC" while it's trying to get range with cell's name. I have put the code of opening excel sheet, and getting cell here. OS:...

VSTO: How to refresh a formula when a cell value changes

Hi there, Let's say I have the formula =MyCustomFunction(D2), where MyCustomFunction is writen in an Excel AddIn using C# How can I, in a sensible way, tell my formula to re-run when cell D2 is changed? ...

Excel controls in VSTO

Hi, I am looking for a control that does the same as the user Defined Function control in Excel So for example when you click on "Average", a control pops up allowing you to type in 2 numbers in text boxes. In the right hand side of the text boxs there is a button that when clicked allows you to select a range of values in excel and w...

Any way to extend or modify drag-and-drop in Outlook with VSTO?

I have an add-in I'm working on in Outlook that relies on drag-and-drop to save an Outlook file to a file automagically. The problem is that the default behaviour is to use the email's subject line as the filename, and emails with extremely long subject lines send an error as there's not enough space in 250 characters to store all of it ...

AutoSize ElementHost in Excel 2003 ActionsPane

Hi, I'm hosting a WPF chart in an Excel 2003 ActionsPane. The chart is set to stretch both horizontally and vertically, however, although the ElementHost and the chart fill the ActionsPane horizontally, I have not found a way to enable the ElementHost to fill vertically. The only property that seems to have any affect on the layout of t...

How to disable shadowcopy for VSTO version 3?

According to this http://blogs.msdn.com/vsod/archive/2008/11/01/office-customization-creates-loads-dll-from-temporary-folder.aspx "Before VSTO version 3.0, there is no way to disable Shadow copy feature in VSTO." But how do I disable shadowcopy for VSTO version 3? ...

ManualUpdate on Excel PivotTable

I'm attemping to update an Excel 2007 pivot table in VSTO (C#) and would like to ensure that the pivot table doesn't get updated until all of my edits are done. So there's a property on the PivotTable class, ManualUpdate, that apparently does exactly what I want. Unfortunately it appears that often times when I assign it the value "tru...

How can I insert OpenXML-Word files into another document programmatically in Word 2003

Hi, I need to insert an OpenXML Word document into another document in Word 2003 inside a VSTO 2005 customization. With the old WordML (2003) documents I used Selection.InsertXML() for this, but OpenXML or the flat XML format (Flat OPC) of it does not work with this method in Word 2003 even if the compatiblity pack is installed (no su...

How to easily create an Excel UDF with VSTO Add-in project

First of I apologize beforehand if this question seems rather “noobish” – but I am entirely new to VSTO development and to StackOverflow, so please bear with me. Thanks :-) What I am trying to do is to create UDF’s for Excel using VSTO’s C# “Excel 2007 Add-in”-project type (since I just want to generate some general UDF’s). As I am only...

VSTO PowerPoint/Excel Interaction

Hi, I want to extract data from PowerPoint slides and then paste them into Excel workbook, where each slide in PowerPoint corresponds to a sheet in Excel workbook and vice-versa (from Excel to PowerPoint). How do I do this? I extracted the data PowerPoint but now how do I make it send to data to Excel? What options/possibilities do I ha...