vsto

Writing third-party controls for Office 2007 so properties are visible in Office Design View mode

I have a MS Word document in which are inserted a series of custom controls that maintain their own state and behaviors. I want the document designer to be able to set properties on these controls in design mode in Word (the designer doesn't have and shouldn't be required to have Visual Studio or be trusted with a compiler). When I use...

ResourceDictionary in WPF Control Library

Hello - We are creating an office ribbon that opens up a WPF window that is stored in another WPF Control library project. That WPF window has some themes attached to it that is stored in a ResourceDictionary that is compiled in a separate project. However when we load up the WPF window, all the themes from the ResourceDictionary are ...

Hooking to Send/Receive Sync event of Outlook Contacts

How to attach an event handler for SendAndReceive event of Contact folders/Contact Items in outlook 2007 using VSTO AddIn. I tried using Application.ActiveExplorer().SyncObjects.ForEach { SyncObject.SyncEnd += \Do something } It is not working ...

Parent window intercepting accelerator

Hi, I have a window that I've placed into another application. In this case, I have a custom application that I injected into a Outlook 2003 Window. I'm having an issue where the parent window (Outlook in this case), is getting WM_COMMAND messages when I press the backspace key in my application. From my limited Win API experience thi...

Replicating Team System's "Open Selection in Microsoft Excel" functionality

In Visual Studio, VSTS has the functionality to select a set of work items and click a button to open them in Excel, where you can modify them. Then, using the 'Team' ribbon, you can publish changes back to TFS. We would like to replicate this functionality in a totally different business context. Does anyone know of any sample code or ...

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 swallowed, the rest of the code fails silently. The exception will be visible if placed in...

MS Outlook - extending forms automatically

I need to develop the Outlook Extension capable of extending existing forms with tabs, downloaded from remote server. For example, in the appointment form additional tab should appear. Form definition in this tab is downloaded from a web service and rendered using, say, WPF. Data for this tab is also coming from server, and is bind to th...

Tables in Excel with VSTO

Hi, I'm really new to VSTO so sorry if this is a newbie question. I'm working on a data entry application where I need to have the user get data into an excel table (e.g. when you highlight a bunch of rows and click "Format As Table"), then I need to read the data in from that table and work with it in C#. At a basic level, I've got a ...

Pass Data into a VSTO Excel Workbook?

Hi, I've got an VSTO Excel Workbook project that I'm using to gather information from a user. This workbook is being launched from inside of a host application, but I need to pass some parameters to the workbook before opening it so it knows what to display and how to display it. What's the best way to do this? ...

Excel VSTO sort dialog box C#

I'm trying to rewrite some VBA code in Excel VSTO. The VBA code is as follows: Application.Dialogs(xlDialogSort).Show When I try to do the same in VSTO I find that the same method needs 30 arguments! The signature is "Show(object Arg0,object Arg1, etc.)" Globals.RiskViewerWorkbook.ThisApplication.Dialogs[XlBuiltInDialog.xlDialogSort...

Dialog.Show Args

Does anybody know what the args are in the VSTO Excel dialog.show function? i.e. I would like to set the Sort Option to select "Header Row" but have no idea how to do this as I can only get the function working by passing missing in for every arg. Globals.RiskViewerWorkbook.ThisApplication.Dialogs[XlBuiltInDialog.xlDialogSort].Show(mis...

the manifest may not be valid or the file could not be opened.

I want to install outlook add-ins (Which is developed by Visual studio 2008) but I've got following error. Name: From: file:///D:/Project/.Net Learning/OutlookAddIn3/OutlookAddIn3/bin/Debug/app.publish/OutlookAddIn3.vsto Exception reading manifest from file:///D:/Project/.Net%20Learning/OutlookAddIn3/OutlookAddIn3/bin/Debug/app.publis...

How to combine multiple Excel files into single Excel workbook with multiple sheets?

I need to develop a service (either WCF or Java) that can take multiple single-sheet Excel files and combine them into a single Excel workbook with multiple sheets. The Excel files are actually exported from crystal reports as individual files. Following are some of the requirements of the service: 1) Should preserve all the formatting...

Producing dynamically generated range names in Excel using c#

What is the best way to produce several tables of unknown size on the same worksheet? Values will be pulled from an oracle database and are used as values on several tables. Is it possible to create dynamic named ranges or is some other method desirable? I have some experience with c# but do not have access to VSTO 2005. Any help or...

How to store information in a Excel WoorkBook

I'm programing an Excel Addin with VS2008 and VSTO(C#) over Office 2007. This addin needs to store information embeded or inside the Wookbook to recover some status when the user opens again the Wookbook with this kind of information. Before save the Wookbook, the Addin serialize in XML all the information, and after open a WoorkBook th...

Outlook Command Bar Fully Intialized event

Hi all, I was wondering if there is any way to know when the Outlook commandbar XXX is fully initialized after I invoke a second instance of Outlook. I have tried to the delegate the event with new Microsoft.Office.Interop.Outlook.ExplorersEvents_NewExplorerEventHandler. But unfortunately when I try to debug it I notice it is still usi...

Determine that XML File is FlatOPC for Word

I need to determine if a Xml-File is a FlatOPC file for Word. How can I achive this? ...

VSTO: How to add text after a bookmark in Word with different formating within the text

I have a word document with a bookmark. I use the bookmark to get a range object which I then set the text of and add to the document. Now I want to add text after that newly added text but with different formatting how do I do this? Now I use something like object oRangeStart = (object) previousRange.End + 1; object oRangeEnd = (object...

How do I set permissions on my VSTO outlook add-in?

I am trying to distribute my Outlook Add-In to the rest of the company. I'm using Visual Studio 2008 Professional and Outlook 2003. In VS I used an installed template for Outlook 2003. It created a solution with BOTH a project and an installer. I use the project and created an Add-In. It works GREAT on my PC in development. Now, I wan...

c# excel legend...

hi, i am using vsto, to work with excel-2007... let's consider i have a matrix as follows A B C 1 10 11 12 2 10 12 11 3 11 10 12 i will always read some random matrix filled with random numbers... ex above, and the other condition is that they will also be colored randomly according to the same numbers...