Questions tagged [vsto]

Visual Studio Tools for Office (VSTO) is a set of development tools for creating Office automation solutions (add-in or document customization), using .NET and the Visual Studio IDE.

Visual Studio Tools for Office (VSTO) is a set of development tools for creating Office automation solutions (add-in or document customization), using .NET and the Visual Studio IDE.

It is expected that questions about VSTO relate to specific programming problems.

This tag should be used on questions about:

  • How to modify ribbons to behave in a certain way
  • How to certain information about a range of text or shape
  • How to access or modify styles
  • How to deploy add-ins and document customizations, e.g. using ClickOnce or an MSI
  • Writing code for any desktop Office application

This tag should not be used for:

Related Tags:

Links:

6576 questions
2
votes
1 answer

Adding a WinForm control to a Word Document using VSTO

I'd like to add labels to my Word document, specifically in the margin. I've seen that things like date pickers and combo boxes can be added to the document, but I can't see anything for what I'm after. I can get the ControlCollection object…
JessMcintosh
  • 460
  • 2
  • 6
  • 21
2
votes
3 answers

Read the ActiveCell content in Excel using VSTO

I'm trying to read the ActiveCell from within an Excel Add-in but not getting very far. Anyone any ideas? Excel.Window W = this.Application.ActiveWindow as Excel.Window; Excel.Range R = W.ActiveCell as…
Plip
  • 1,040
  • 8
  • 9
2
votes
0 answers

Create excel async function

I have an excel function that get's data from the internet. The problem is that the function takes a long time to execute and it slows down everything. It will be amazing if I can change the value of the cell without changing its formula! So if I…
Tono Nam
  • 34,064
  • 78
  • 298
  • 470
2
votes
1 answer

Excel: Getting the surrounding named range in Excel

I have an Excel sheet with many named ranges, which have an hierarchical structure (one range contains other ranges). The ranges have no intersections and no multipel areas. How can I estimate the the surounding named range of a specific named range…
M. X
  • 1,307
  • 4
  • 19
  • 34
2
votes
0 answers

VSTO 3.0 Excel 2007 Addin Tab doesn't display

This is a very odd problem I've found. I have written and successsfully deployed a VSTO 3.0 Addin for Excel 2007. The problem is that the Tab for the Ribbon only shows up on NEW instances of Excel; the Tab doesn't display if I first open an already…
Gene
  • 210
  • 2
  • 11
2
votes
2 answers

How to find out if application is busy in VSTO

I'm trying to save a presentation as WMV file in VSTO 2012(C#) which takes a while and after saving it, close the powerpoint and display the media. But I can not determine when the saving is completed, and if I close the application before the…
Javid_p84
  • 848
  • 2
  • 12
  • 26
2
votes
2 answers

C# iterate generic object

Am moving from Excel VBA to VSTO using C#. In VBA I had a 3 line custom function called IsInCollection as shown below: On Error Resume Next Set obj = collectionObject(itemObject) IsInCollection = Not (obj is Nothing) I used it all the time to…
COG
  • 291
  • 2
  • 12
2
votes
1 answer

VSTO insert image into word, excel, power-point and mail attachment in outlook

I'm developing VSTO application. At some point i create an image that i want to display it to the user. My question: How to insert that image into the word document. How to insert that image into the active excel sheet. How to insert that image…
ebram khalil
  • 8,252
  • 7
  • 42
  • 60
2
votes
1 answer

Shared code between two outlook VSTO addins

We have a situation where we will have two VSTO Outlook add-ins which both start off with some common shared code, but the shared code will probably diverge over time. Ideally, we'd like to restructure the add-ins to factor out the common code into…
Rohith
  • 2,043
  • 1
  • 17
  • 42
2
votes
2 answers

Create an instance of a class sent by parameter / Delegates

I am trying to optimize my code a bit by either using delegates or using a class instance as parameter. I am pretty new to C# and I am not yet sure which one is the better approach assuming im on the right track in the first place. But my problem…
user2140173
2
votes
1 answer

Is there a reason to not use "1" class with a small VSTO Add-in?

I know that in reality if you make a VSTO project in VS, that you start with several classes auto-generated before you write a line of code. I also understand (I think) the single responsibility principle. That said, I find myself writing several…
Atl LED
  • 656
  • 2
  • 8
  • 31
2
votes
2 answers

How can I identify the document that contains an embedded chart?

I have a COM add-in for Excel that works with the active workbook, and while it mostly works I'm having trouble with one particular scenario. If I have a chart in a Word 2010 document that I created using Insert->Chart, then when I click Chart…
Gary McGill
  • 26,400
  • 25
  • 118
  • 202
2
votes
0 answers

C# Microsoft.Interop.Document.Save() not failing in Office Word 2010

I'm attempting to Save a document via WebDAV in Word 2010, but on failure no Exception is thrown. I know there's a failure since (for debugging) I'm forcing an HTTP 500 to be returned from the Apache server on PUT. This works in Office 2007. I…
Jose Leon
  • 1,615
  • 3
  • 22
  • 30
2
votes
1 answer

Retrieve recipients from Outlook new mail

We have an application whereby users can click a button that opens up a new email in Outlook. I am writing an add-in that will allow the user to add this email to an email scheduling application that we have written. (The delayed delivery…
Ukodiak
  • 61
  • 4
2
votes
0 answers

To detach or not to detach? entity framework IBindingList issue

MY PROBLEM: I have a listobject that I want to persist to sql server and when I call .SaveChanges() on Entity Framework it will fail because some objects in the context are not valid. MY QUESTION: HOW DO I PERSIST ONLY VALID CHANGES? I'll work on…
Chris Hayes
  • 3,876
  • 7
  • 42
  • 72
1 2 3
99
100