vsto

Column No to Column Letter in Excel/VSTO using C#

How to find column's name or header? For example if i select column 5 in excel means i want the result as "E". How to get the alphabet or letter corresponding to column no. Please help me with the code ...

Writing string, numeric data to Excel via C# works, but Excel does not treat numeric data correctly

Hi, I'm getting result sets from Sybase that I return to a C# client. I use the below function to write the result set data to Excel: private static void WriteData(Excel.Worksheet worksheet, string cellRef, ref string[,] data) { Excel.Range range = worksheet.get_Range(cellRef, Missing.Value); if (data.GetLength(0) != 0) ...

Visual Studio 2010 RC with Office 2010 and Office 2007 installed

I have Visual Studio 2010 installed on my Windows XP development machine along with Office 2007 Professional and Office 2010 Professional. I am trying to develop several add-ins for Office 2007; however, I prefer to use Office 2010 on a day-to-day basis. How do I set Visual Studio 2010 to install the add-in and open Word 2007 when I pr...

VSTO and Office 2010

Does VSTO 2008 work for Office 2010 or will it only be VSTO 2010? If it is VSTO 2010 then does this mean that I have to update all my clients to .NET 4.0? ...

How to effectively use WorkbookBeforeClose event correctly?

On a daily basis, a person needs to check that specific workbooks have been correctly updated with Bloomberg and Reuters market data; i.e. all data has pulled through and that the 'numbers look correct'. In the past, people were not checking the 'numbers' which led to inaccurate uploads to other systems. The idea is that 'something' nee...

VSTO Development - Key Improvements In VS2010 / .NET 4.0?

Hi all, I am trying to make a case to my bosses on why we should use VS2010 for an upcoming Excel Workbook VSTO application. I haven't used VSTO before but have used VBA. With 2010 just around the corner, I wanted to read about the improvements made to see if it was worth using 2010 to develop this application. So far I have read 2 maj...

Error while trying to insert image in to wordML

Hi, Help needed. I am getting this error {"The xml has invalid content and cannot be constructed as an element.\r\nParameter name: outerXml"} while passing constructed xml in to DocumentFormat.OpenXml.Office.Drawing.Drawing() constructor like this DocumentFormat.OpenXml.Office.Drawing.Drawing d = new DocumentFormat.OpenXml.Office...

Cannot create instance of abstract class

I am trying to compile the following code and i am getting the error: Cannot create instance of abstract class . Please help m_objExcel = new Excel.Application(); m_objBooks = (Excel.Workbooks)m_objExcel.Workbooks; m_objBook = (Excel._Workbook)(m_objBooks.Add(m_objOpt)); m_objSheets = (Excel.Sheets)m_objBook.Worksheets; m_objSheet = (E...

Need to place a floating modeless form over excel main window (quasi-task pane)

Hi I need to emulate a task pane by floating a modeless form over the Excel main window. The reason for this requirement is that I need to have taskpane features for my Excel 2003 add-in, but cannot use the document-centric model. Can anyone suggest what would be the best way to do this? The modeless form would need to detect the ma...

Making ThisWorkbook talk with ThisAddIn

I have a solution containing an VSTO Excel AddIn project and an VSTO Excel Template project. Is there any design pattern (or hack) that can allow the ThisAddIn instance to access properties and methods of the ThisWorkbook instance, and vice versa? Also I should note that I'm using VS 2008, VSTO 2005SE, and the target Office version i...

VSTO Outlook project

I currently have an Outlook 2007 VSTO plug-in which needs to write certain values into the registry. I am programmitically downloading and installing a new stationery into Outlook by saving a htm file into the users App Data folder and then updating the HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Common\MailSettings\NewTheme registr...

System.Threading.ThreadstateException

Hi, I'm developing an adding for office powerpoint application. I'm trying to display a description of the object(Customized object) currently dropped on the powerpoint slide in design mode(Design mode of the powerpoint). When i click on my addin the related object description will be displayed on a tabbed window as the first tabpage. T...

Outlook 2007 Add In. adding menu every time i debug the application in VS2008

hi, I am creating an Add In for Outlook 2007 using VS2008. I have created a menu in the toolbar. Every time i am debugging the application in VS its creating another menu item in toolbar. Like my meni item name is Test. First time i run the application It was showing File .... Test Second time File ... Test Test and so on.. Whats go...

Want to create/show dialog of folders list [Outlook Add in]

hi, I am creating an Add in for Outlook using VSTO. I have created a menu item and on click of menu item i want to show a dialog box containing list of all folders with check boxes. How can i do this? Please guide me. thanks ...

Deploying Excel 2003 VSTO Workbook using Sharepoint for versioning control

I have an excel 2003 vsto workbook that I would like to make available via sharepoint for version control. Ideally it could be checked in/out by non-developers for tweaking excel equations, and I would be able to deploy the compiled dlls somewhere else when I need to update the managed VSTO code. I understand I may need to use some click...

0xe0434f4d exception when closing .NET VSTO Excel 2003 Workbook solution

I've written a control that runs from the Actions Pane in Excel 03. This control references a satellite .NET assembly. The control works fine but when I exit excel I get an exception. I've gone through and made sure that I'm properly disposing all of my objects. I called the dispose method on cldatapi object I created and set it to not...

UDF in VSTO without creating a separate project

Hi there! Is there any way to implement an UDF in my Excel 2007 add-In without creating a separate project? Even if this requires using dirty tricks I'd like to know about it. Actually, I'd like to know about any exiting ways to do this. So, if I can't... I heard something about official MS response on this problem, but i can`t find it...

Code Profiling of VSTO application

I'm looking for a free code profiler (performance profiler, not a memory profiler) which works for VSTO applications (specifically Excel in my case, but I gather that if it works for one, it should work for all). I have tried Eqatec Profiler, but it can't seem to launch the application from the profiler (The Run app button is greyed o...

Outlook 2003 Add-In Setup Project with COM DLL Deployment Problem

Hi, I developed an Outlook 2003 add-in which uses the com dll redemption. I created a visual studio 2008 setup project, added a custom action to run "caspol.exe -machine -addgroup 1 -strong -hex [key] -noname -noversion FullTrust -n \"Name\" -description \"desc\" and moved the registry keys under software to HKLM as described in http://m...

Excel VSTO ->Hide/Unhide Ribbon Button based on another Ribbon Button click

We are creating Excel 2007 AddIn using VSTO. Now we have a scenario where in there are 2 buttons. Button 'A' and Button 'B'. Button 'B'needs to be hidden based on the click on the button 'A'. But since the ribbon bar is not getting refreshed dynamically we are unable to see the change on the Ribbon Bar. I heard from some blods we need...