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
26
votes
3 answers

How do I create a real-time Excel automation add-in in C# using RtdServer?

I was tasked with writing a real-time Excel automation add-in in C# using RtdServer for work. I relied heavily on the knowledge that I came across in Stack Overflow. I have decide to express my thanks by writing up a how to document that ties…
Frank
  • 3,029
  • 5
  • 34
  • 43
26
votes
3 answers

VSTO, Outlook add-ins, and Visual Studio 2015

Starting with Visual Studio RC, Visual Studio 2015 appears to no longer support the Office Add-In project types from Visual Studio Tools for Office (VSTO). Lots of googlin' and questions to PMs in the MS blogs have revealed no useful information;…
toddwseattle
  • 693
  • 1
  • 7
  • 15
26
votes
2 answers

How to know if a cell has an error in the formula in C#

In an Excel formula you can use =ISERR(A1) or =ISERROR(A1) In a VBA macro you can use IsError(sheet.Cells(1, 1)) But using a VSTO Excel Addin project I did not found similar function under the Microsoft.Office.Interop.Excel API. I only want to know…
Pascal
  • 1,131
  • 1
  • 9
  • 14
25
votes
2 answers

VSTO Outlook addin need to save settings, best way?

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…
Dan C.
  • 559
  • 3
  • 8
  • 26
25
votes
4 answers

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

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…
user2155507
24
votes
9 answers

Iterating through all the cells in Excel VBA or VSTO 2005

I need to simply go through all the cells in a Excel Spreadsheet and check the values in the cells. The cells may contain text, numbers or be blank. I am not very familiar / comfortable working with the concept of 'Range'. Therefore, any sample…
Ryan Liang
  • 658
  • 2
  • 9
  • 17
23
votes
3 answers

VSTO: invoking on main Excel thread

I have a button on an Excel sheet which starts a new thread to do some processing. If I want to make any changes to Excel (e.g. write data to a cell using Worksheet.Range("A1").Value = "info";), I think I must use the main UI thread. How can this be…
Laurent
  • 5,953
  • 14
  • 43
  • 59
22
votes
4 answers

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

What I am trying to do is to create User Defined Functions (UDFs) for Excel using VSTO’s C# “Excel 2007 Add-in”-project type (since I just want to generate some general UDFs). As I am only trying to learn the basics (at this stage anyhow) this is…
user118193
22
votes
7 answers

custom ribbon not appearing in outlook when when running a build in vs

I followed this tutorial, but when I build then run my project in visual studio a ribbon tab does not appear. I'm using outlook 2010 if that helps.
xxyyxx
  • 2,306
  • 3
  • 24
  • 34
20
votes
2 answers

How do you use WiX to deploy VSTO 3.0 addins?

I want to deploy a VSTO 3 Application Level Word 2007 addin that I've written with Visual Studio 2008. I see that WiX has an extension named WixOfficeExtension that looks like it might have this functionality, but I can't find any documentation for…
Jacob
  • 22,785
  • 8
  • 39
  • 55
20
votes
2 answers

Hooked events Outlook VSTO continuing job on main Thread

I have developed an Outlook VSTO addin. Some tasks should be made on a background thread. Typically, checking something in my local db or invoking a web request. After reading several posts, I dropped the idea of calling the Outlook Object Model…
Benoit Patra
  • 4,355
  • 5
  • 30
  • 53
19
votes
2 answers

Please explain why I am able to instantiate the "Application" interface in Excel VSTO

I have the following C# code in my application which works just fine. It launches a new instance of Excel. private readonly Microsoft.Office.Interop.Excel.Application _application; _application = new…
Dan Ling
  • 2,965
  • 2
  • 29
  • 43
18
votes
5 answers

How to handle events from embedded Excel.OleObjects or Excel.Shapes

I'm working on C# and now VB.NET ports of an old VBA program. It has lots of MSForms/OleObjects embedded in it like CommandButton or even images. My first thought was to declare all the buttons as Microsoft.Vbe.Interop.Forms.CommandButtonbut that…
Atl LED
  • 656
  • 2
  • 8
  • 31
18
votes
3 answers

Word VSTO swallows exceptions at runtime without debugging?

Place this code somewhere in a Word document level VSTO solution outside of ThisDocument_Startup (create a ribbon button, with a click event): int zero = 0; int divideByZero = 10 / zero; Start without debugging (Ctrl + F5), Result: Exception is…
Michael Regan
  • 1,568
  • 16
  • 17
17
votes
5 answers

Adding items to RibbonDropDown at runtime

So I have a dropdown menu in a ribbon with contents that can be changed while it is being used. Outlook is also happy to let me 'add' or 'insert' items into it, as long as I do not add more than 1 item. If I try to, I'll be told that the index is…
CodeMinion
  • 653
  • 2
  • 10
  • 24