vsto

Using VSTO in a standalone application to access Excel sheets

Dear all, tried to research on that but sometimes I seem to lack some googling skills... I want to develop a (standalone) WinForms application which uses automation for communicating with Excel. I already know how to use the Interop, but I thought the VSTO tools would provide a more comfortable or sophisticated way to do that. My idea...

Excel.Range to String conversion in C#

Using .NET's Office interop libraries, does anybody know the best way to convert back and forth between strings (eg "A57", "$L$2:$M:$3") and corresponding objects of type Excel.Range? Bonus points if it also works with "named ranges". ...

In Word, Programmatically Open New Document Dialog

I am looking for a way to programatically open the "New Document" dialog in Word 2007. It is the same one you get when you select File->New . You can also open it using the FileNew macro or the "New..." menu command. However, I have been unable to find a way to do this programmatically. I have tried: Application.Run MacroName:="Fil...

Execution permission cannot be acquired for Outlook 2003 addin

...

Optional Fields in InfoPath; Getting the XML node with VB

I use VB to get data through my form. I have some optional fields in my form and I have a problem with the following code: MsgBox(myXPathNavigator.SelectSingleNode( _ "/my:Status/my:Questions/my:Questions1", Me.NamespaceManager _ ).IsNode.ToString) When the optional field 'Questions1' is inserted into the form I get the value 'true'...

Excel VSTO set selection

How do I set the selection in the active worksheet to a specific Range, using C# and VSTO 2008? ...

Installing VSTO 4.0 Causes VSTO 3.0 Addin to quit working

I just installed Visual Studio 2010 yesterday. As part of that I installed VSTO 4.0. Now when I run any Office application, my VSTO 3.0 addins fail to load. The error in the event log is Customization URI: file:///H:/PathToMyAddin/MyAddin.vsto Exception: Customization does not have the permissions required to create an application do...

I have a VSTO application as an add-in to MS Word and I want to set keyboard shortcuts to the ribbon buttons

When I developed this app (in C# Visual Studio 2008) I asked the same question (actually managed to find an answer on the MS forum, for which I deserve a prize of some sort). The answer from MS was that the only way to set keyboard shortcuts to your own methods is to write a macro which invokes the method (via COM. obviously) and set the...

Documentation for the Excel object model.

The documentation for .NET's Excel interop API at msdn.com seems rather sparse. Does anyone know of more thorough documentation elsewhere on the web? I am looking for something that would, for example, list and explain all the properties of a Worksheet object. Thanks. ...

Set Publisher in Word Options Add-Ins Dialog

I have made an addin for Microsoft Word 2010 Beta using Visual Studio 2010 RTM. When I look at "View and manage Microsoft Office Add-ins" the publisher shows up as None. Would code signing with a Software Publisher Certificate fill in the Publisher field? The ClickOnce manifest is signed with a Code Signing certificate. Would signing...

How to get/set paragraph before/after spacing of list items in PowerPoint with VSTO

I'm working on a PowerPoint VSTO addin and am needing to get at the margins between List Items. In the PowerPoint interface, you can adjust this value by right clicking the individual paragraph and selecting paragraph and then adjusting the Before or After value in the Spacing section (for PowerPoint 2007). This is the same place that ...

How to Override a private set property

Hi, Im using the Microsoft.Office.Interop.MSProject.Resource assembly which has a "UniqueID" property, it has a get but not set. How can I actually set a value? An example would be very much appreciated. --Update-- Ok I can get the value for a property "Name" and set, but Im intersted in the "UniqueId" property that does not have a pu...

VSTO Outlook : How to add a group into a build in tab ?

I wanna ad a group on the main tab of compose mail, like in this picture. ...

VSTO outlook data issue through exchange sync

I wrote an addin for outlook, It will popup appointment's LastModificationTime while I click button the button eventhandler like this Outlook.ApplicationClass outlook = new Outlook.ApplicationClass(); Outlook.NameSpace ns = outlook.GetNamespace("MAPI"); Outlook.MAPIFolder folder = ns.GetDefaultFolder(Outlook.OlDefaultFolders.olFo...

Outlook AppointmentItem Write Event - how many times does it execute

I need to perform some activity when an appointmentitem (or specifically a meeting) is saved. What I want is once the user has filled in the info and clicks 'send', Outlook does it's stuff and my code executes once. However what I'm finding, is that the Write event occurs multiple times - at least twice, sometimes more (eg in updates)...

Excel Merge() vs MergeCells

Hi, I'm using VSTO, C#, and Excel but VBA probably applies here as well. What's the difference between calling the Merge(missing) method on a range and setting the MergeCells property to true? Does Merge() fail more often? Thanks! ...

Get the Default datatype for excel column using VSTO

Is there a way to get the default datatype assigned by excel to its columns using VSTO c#. ...

How do I deploy a word template solution and run it regardless of it's location?

Hi, I'm trying to deploy a Word Template solution that uses VSTO with VS2010. Everything goes well until I try to move the template file away from the folder that has the assemblies (then I get a "failed to customization error"). What is the best way to make sure that file knows where the assemblies are? Should I update the _Assem...

Problem with Workbook Events and reading Table Objects

Hi, I am working on an excel workbook add-in where I'm supposed to add a menu item to the ribbon which I already done. I have to enable this menu item when the user clicks on the table object in the worksheet. Can anyone please tell me what event should I use to achieve this and how to find out of the current cell is part if a table ob...

Microsoft.Office.Interop.Excel.ListObject vs Microsoft.Office.Tools.Excel.ListObject

I need to access the Selected Event of all the listobjects in all the worksheets of my workbook but when I access worksheet.listobject, that object apparently belongs to Microsoft.Office.Interop.Excel.ListObject and so doesn't have any events where as the table list object belongs to Microsoft.Office.Tools.Excel.ListObject. And I read ...