vsto

VSTO 3.0 Get/Change an excel 2007 workbook connection

Hi all, I've struggling to find a way to get and change and excel 2007 workbook connection (Menu Data -> Existing Connections -> Connections on this Workbook).It's a connection (several actually) to a SQL Server and used in a pivot table. I've tried using Application.ActiveWorkbook.Connections or Globals.ThisWorkbook.Connections but th...

Accessing a VSTO application-addin types from VBA (Excel)

We have a VSTO application-addin (not a document-addin) for Excel, and we want to expose an event to VBA code so that the VBA macro can do some action when this event fires in the addin. How can I get the VBA code to be able to subscribe to an event defined in the VSTO application-addin? I'd think that since the addin is loaded in the ...

VSTO 3.0 CustomTaskPane Focus Problem

The custom task pane in my VSTO 3.0 Excel Add-In Project contains a list box which handles the DoubleClick and SelectedIndexChanged events. The goal is to focus a given cell in edit mode so that the user can "just write" into the activated cell. The problem I'm currently facing is that the cell is "selected" but the list box still has...

VSTO: can't open another Excel file, while first file is blocked by modal window from Add-in

We can't open another Excel file, while first file is blocked by modal window from our Add-in. Closing the dialog window unfreezes all pending file opens. Excel version is 2007. Is there a programmatic work around, that would allow Microsoft Excel 2007 to open the second file in a separate window, while first window is waiting for the A...

VSTO merged cells

Is there any way in VSTO (/JET OLEDB or other methods of reading excel files) to tell if the data comes from a single cell or merged range of cells and get this range ? ...

VSTO: Event for Word Doc's Content/Text Changes?

Good afternoon, does anyone know whether it's possible to handle content changes or more precisely whether there's an event for that... one that would notify me if a document's content has been changed (ideally at what position/range etc)? Cheers and thanks, J ...

Cannot install .msi package silently

Hi I have an Office 2007 add-in (developed using Visual Studio 2005 Tools for Office Second Edition) which has been packaged into an .msi file, using the Setup project in Visual Studio 2005 The problem is that when the users install the package themselves by using Next->Next->Finish then everything works normally, but when I try to ins...

How to persist "data links/sources" from dynamic ListObject(VSTO) to other Excel components like Charts or Pivot Tables?

Hello, I am facing one an issue to persist "data links/sources" from ListObject to other Excel components like Charts or Pivot Tables. Steps to reproduce. 1) Create Excel AddIn. 2) Add a ListObject to the worksheet runtime 3) Assign a Datatable to ListObject 4) ListObject populate data 5) User add Chart or Pivot...

Outlook modify and Save() MailItems - slow

I need to modify many MailItems in Outlook 2007. I need the mails to immediately refresh in the main Outlook grid - the only way to do this I found is to call MailItem.Save(). foreach (var item in folder.Items) { var mail = item as MailItem; if (mail != null) // process only MailItems { setUserProperty(mail, use...

Installing Office Customization

Name: From: file:///D:/Samples/TestUpdatedVersion/bin/Debug/TestUpdatedVersion.vsto The customization cannot be installed because another version is currently installed and cannot be upgraded from this location. To install this version of the customization, first use Add or Remove Programs to uninstall this program: TestUpdatedVersion....

How to add toolbar button to contact item window in Outlook?

I am developing an add-in for Outlook. One requirement is to add a toolbar button to the contact item window. Can anyone tell me how to implement it? Thanks. ...

Excel Interop fails when I open the Excel applicaion manually! Why?

Hi I have a c# application that uses Microsoft.Office.Interop.Excel. The application runs for a long period of time! If I try to open Excel manually on a different worksheet from the one the c# application is processing the c# application fails with some HResult cryptic message. Is there a limitation with Microsoft.Office.Interop....

How to identify a formula of cell contains defined names in Excel by using VSTO?

Hi folks, Is there any way to identify a formula of excel cell contains defined names by using VSTO? Or is there any way to replace the defined Excel.Name in formula of a Excel cell when the name of Excel.Name is changed by using VSTO? thanks, Yst ...

Is it possible to do Undo/Redo in Excel using C#?

My VSTO application is a C# Add-In. I would like to add some undo(Ctrl +z) and redo functionality(Ctrl +Y). ...

How to create a button like New Mail in Outlook add-in?

Can anyone pls tell me how to create a button(in CommandBar) like 'New Mail' (with a dropdown list) in Outlook? When one clicks on the button it should do some action and when clicked on the down arrow mark, it should populate a list of items. I am in need of this very much. If anyone know the answer pls let me know. Thanks in advance!...

Issue: VS2005 not working with VSTO for Office 2007

Hello all. Here at work I have Visual Studio 2005 and Office 2007 installed. I'm trying to install the VSTO package to create a templated Word Document project. I installed the VSTO package via this link: http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=8315654b-a5ae-4108-b7fc-186402563f2b#filelist Whenever...

What is the difference between Office Automation, VSTO, and Open XML SDK?

What is the difference between Office Automation, VSTO, and Open XML SDK? Do we need all of them or some of them are obsolete? ...

VSTO find ContentControls of a Word Document

Is there a way to find all ContentControls of a WordDocument (including ContentControls in Headers, Footers, TextBoxes ...) using VSTO? Microsoft.Office.Tools.Word.Document.ContentContols returns only the ContentControls of the Main-Document, not the one inside the Headers/Footer. ...

Reason not to use LINQ

Are there any good Reasons not to use LINQ in my projcts? We use .Net 3.5 and VSTO 3.0. ...

C# Excel import data from CSV into Excel

How do I import data in Excel from a CSV file using C#? Actually, what I want to achieve is similar to what we do in Excel, you go to the Data tab and then select From Text option and then use the Text to columns option and select CSV and it does the magic, and all that stuff. I want to automate it. If you could head me in the right di...