Click here to Skip to main content
15,891,033 members
Everything / Interop

Interop

interop

Great Reads

by Leif Simon Goodwin
How to pass strings between managed and unmanaged code
by Christ Akkermans
An introduction to the strange world of mixed language programming with FORTRAN and C# .NET code
by Debabrata_Das
This article will talk about how a WCF service can be consumed by a Java client application.
by koolprasad2003
This article explain you How to protect word document using C# and Word automation

Latest Articles

by ToughDev
How to convert OFT to .NET Windows Form in VS
by William Damert
Console .NET application using Microsoft.Office.Interop.Word for keyword search
by Lee P Richardson
Which SPA technology should you use: Blazor WebAssembly or something more mature like Angular, and why?

All Articles

Sort by Title

Interop 

2 Jan 2017 by ielsky
Hello Everybody.I have strange situation in my applicaion (MS Outlook Addin).I work with MailItem object in Item.Open event handler.I get Inspector object calling MailItem.GetInspector property.When I try to set handler for Inspector.Close event InvalidComObjectException with message...
1 Feb 2011 by Nish Nishant
One likely cause is that you are accessing a single threaded COM object from different threads. In your case, the event handler may not be running on the thread that created the COM object.
25 May 2016 by Sergey Aseev
You need have strong reference to event.Anything like thisMailItem mailItem;CloseEvent closeEvent;...InspectorEvents_10_Event inspectorEvents = mailItem.GetInspector;closeEvent = inspectorEvents.Close;closeEvent += delegate {.....};
2 Jan 2017 by Jason_Kiscy
hey,Hi, I am facing the same problem it is really difficult to debug it because the test case is not unique. did you find a solution? I really appreciate your help in advance.Here is my mailbox:1424870395@qq.com
17 May 2016 by m.r.m.40
I'm using visual studio 2010 (VB.net technology) and office 2010 I'm trying to use excel functionalities in vb.net I face the error below:MsoAppLanguageID is ambiguous in the namespace Microsoft.Office.Core.I add two following references: Microsoft Excel 14.0 Object Library Microsoft...
17 May 2016 by m.r.m.40
The problem was with adding extra references to the project, i removed all office dependencies and only added the excel reference and used the interop.Excel so it got solved.
8 Feb 2011 by whoyousee
hi,guysI'd like a word document inside the 25 to 45 the Range, inside which the data is added to another document? The Range There may be pictures or tables, it is not the way a string is added to another document. The following method can meet the requirement, but if the client during the...
9 Aug 2012 by bChen@sh
This article explores the rules of how AddRef and Release are called in RCW and COM, which addresses the issue of RCW memory leaks.
10 Nov 2011 by jbarrylivingston
How do I return an array of doubles from a managed .NET C# object to unmanaged c++ COM code?If in C# i define a class as: (and tell visual studio to make the assembly COM visible)public interface _myinterface{ public double[] getDoubles()}public class myinterface:...
10 Nov 2011 by Joshi, Rushikesh
working within Com API and unmanaged code is always tricky. Below thread might help you.http://www.codeproject.com/KB/cs/UnmanagedArraysInCSharp.aspxRegardsRushi
17 Aug 2011 by Jdlogic
I'm sure this question gets asked quite a bit, however I've looked around and simply cannot find any good(detailed and explained in-depth) Articles about this subject. So to get started here is what I need/want and what I'm working with.First off I'm relatively new to programing and plan...
17 Aug 2011 by #realJSOP
Your best bet is to google variations of "c# interop services", and look for stuff that resembles what you unmanaged DLL does as far as return types and parameter types are concerned. You didn't mention if it was a standrad C++ dll or a MFC DLL (or what *kind* of MFC dll) it is, so you should...
17 Aug 2011 by Simon Bang Terkildsen
Have a look at this blog post (you can skip the native to managed part)http://blogs.msdn.com/b/deeptanshuv/archive/2005/06/26/432870.aspx[^]Edit: oh, if you care I googled "C# dll interop c++" to find that blog post
17 Aug 2011 by Espen Harlinn
Here is an article that shows how to mix native and managed C++ code: Using ACE with C++ CLI[^]Best regardsEspen Harlinn
6 Sep 2016 by TatsuSheva
I did this code and I put in a timer in order to check if the exe is open or closed.I create a class and put it inside and then call it after in Winforms.Here is the code:private static WINDOWPLACEMENT GetPlacement(IntPtr hwnd) { WINDOWPLACEMENT placement = new...
6 Sep 2016 by xXxRevolutionxXx
When an executable is open in the system... there will be a process with the exact same name as the file. For example if you are looking for an exe file which is called: SystemCleaner.exe you can find it as a process with the name: SystemCleaner.Accordingly if the file name has a space, for...
4 Feb 2016 by Dave Kreskowiak
I seriously doubt you'll ever find one that covers all those topics in one plan.You'll stuff that covers sections of those topics, for example, Introduction to the .NET Framework, Introduction to C#, Unit Testing for Beginners, but you'll never anything that covers all of this stuff advanced...
23 Aug 2012 by Belial09
Hi,I have developed an VB.NET InteropUserControl which works properly on my pc.The InteropUserControl is used in a form in an Access 2010 MDA File. If i deploy it as an MDE File to another pc, the Form won’t open with the errormessage "There is no control in this object". The Control...
28 Jun 2011 by Brendon1234
Hi(Just a heads up that I have also posted this on the MSDN WCF Forum: http://social.msdn.microsoft.com/Forums/en/wcf/thread/87a254c8-e9d1-4d4c-8f62-54eae497423f)I will include quite a bit of information in this question. Basically I'm writing a WCF service and separate example .NET and...
4 Oct 2012 by arshad alam
0 down vote favorite i am creating a add-ins for Microsoft Word. i have a tree-view control where i am generating Folder, files and File's bookmarks in hierarchical structure.For this i am using these code :void GetTree(string strSearchPath) { ...
27 Dec 2012 by ksk kanna
i am using word interop services to create a word document in C#.netnow i wants to add a form field like text field or check field.Any one help would be appriciated.Thanks in advance.
28 Dec 2012 by Zoltán Zörgő
[Updated]This might help: http://msdn.microsoft.com/en-us/library/microsoft.office.interop.word.formfield.aspx[^]
2 Aug 2013 by bhavesh002
worksheet.Pictures.Add("Pengui...
2 Aug 2013 by ZurdoDev
If relative is not working then just use the full path. You can get the path to your workbook by usingApplication.ActiveWorkbook.Path
2 Aug 2013 by Maciej Los
[EDIT]You can use application StartupPath[^], which returns the path for the executable file that started the application, not including the executable name.HOW TO: Determine the Executing Application's Path[^][/EDIT]String sFile = "MyPicture.jpg";String sPath =...
16 May 2013 by chenduran10
How can I make the export more faster.this one is too slow..
14 May 2013 by CHill60
To improve performance you need to minimise the use of the Excel COM interface.I would suggest converting your list of objects to a datatable first and then exporting that to excel ...Here is a generic way to convert a list to a datatable Converting a List to Datatable[^]and here's how...
14 May 2013 by Maciej Los
If you fetching data from database, the fastest way to export data is to use CopyFromRange()[^] method for MS Excel range.More about: How to transfer data to an Excel workbook by using Visual C# 2005 or Visual C# .NET[^]
14 Apr 2018 by Andy Galluzzi
Join me to create the most advanced yet most simple to use full duplex MMF based IPC for Windows
11 Jul 2012 by Dale Pedzinski
I have find out I need the Microsoft.Office.Interop.VisOcxand Microsoft.Office.Interop.Visio (ver 14). But I have no clue how to do it for visual Studio 2010 and the updated PIA's. There are several links out there to do for the older PIA's and Visio SDK but many of the methods and properties...
13 Aug 2012 by Kenneth Haugland
You will have to add the relevant dll interop:http://msdn.microsoft.com/en-us/library/15s06t57.aspx[^]The documentation of Visio:http://msdn.microsoft.com/en-us/library/cc160740.aspx[^]You should now be able to complete your project :)
10 Sep 2014 by #realJSOP
VS2013, Win7 (32-bit)I'm writing a WPF app that utilizes MEF, and one of the modules (the one I'm testing) uses interop services. When I run the app to test the module, the app shuts down with no indication that anything is wrong. I've put try/catch blocks around the code where it stops, and...
20 Feb 2012 by Duc Huy Nguyen
Hi there,I'm working in a C# project that processing the Excel sheet. I want to append at the end of sheet and make no changes to the current style of sheet.I can do it with Microsoft.Interop.Excel but it seems to be difficult when a user don't use MS Excel software.I try ExcelLibrary and...
20 Feb 2012 by pietvredeveld
Try OleDbConnection.Sample :var excelConnection = new OleDbConnection("Provider=Microsoft.Jet.OleDb.4.0; Data Source=" + location + ";Mode=ReadWrite;Extended Properties=Excel 8.0;");excelConnection.Open();Or else LinqToExcelRegardsPiet
27 May 2011 by buzzluck68
I have built an ASP.NET web application (that houses a Silverlight 4 app) and it utilizes a couple of COM dlls. The dlls are registered (verified by finding the CLSIDs in the registry, and seeing the classes within the CLSIDs), and they are located in a directory that has full control for all...
27 May 2011 by Ankur\m/
This discussion talks about a possible work around for the error: http://forums.asp.net/t/1119052.aspx[^]BTW there are many other discussions here[^] :thumbsup:
27 May 2011 by #realJSOP
I found this on the first page of over 2.1 million results with a google search for "asp.net class not registered":http://forums.asp.net/p/1046003/1467497.aspx[^]
27 May 2011 by buzzluck68
The solution was a stupid oversight on my part. Since I am still learing IIS, i set the application pool to have the correct settings, but I forgot to set the site to use the application pool.The application pool had to be set to allow 32-bit applications, which it was, but was not being...
8 Sep 2015 by abdulwahid
My problem and the solutionI have a 32 bit third party dll which i have installed in 2008 R2 machine which is 64 bit.I have a wcf service created in .net 4.5 framework which calls the 32 bit third party dll for process. Now i have build property set to target 'any' cpu and deployed it to...
17 May 2012 by Khawar Abbas1
hi dear I want to integrate crt450 card reader with my c#.net 2010 applicationthe read card function gave error rc = CRT450_ReadCard(a, 0x31, 0x0F, true, 0x30, _FingerFeatures1, 0x0000000d);-------------------------[DllImport("CRT450U.dll")] public static extern unsafe...
31 Oct 2010 by karle
Your .NET prototype is not correct.In C code _IsOutofTime, _mode, _CardData[],_CardDataLen is a pointer an will (or can) be modified from inside the c function. So your memory will be corrupet when calling this function.You have to change the .NET prototype.trypublic static extern...
17 May 2012 by Member 8147724
you can try with this one [DllImport("CRT450U.dll")]public static extern Int32 CommOpen();[DllImport("CRT450U.dll")]public static extern Int32 CommClose(Int32 hcom);[DllImport("CRT450U.dll")]public static extern Int32 GetDeviceCapabilities(Int32 hcom, ref Int32...
17 May 2012 by krmed
Admittedly, I haven't thoroughly read all the previous responses/comments, but here's something I see.The api says the function prototype is:int APIENTRY CRT450_ReadCard (HANDLE ComHandle, BYTE _ReadOption, BYTE _WaitTime, bool *_IsOutofTime, BYTE *_mode,BYTE _CardData[],int...
27 Dec 2010 by Maan123
Hi,Does anybody knows how to do automatic numbering using the Word Interop?Thank,Maan
27 Dec 2010 by Amit Kumar Tiwari
Try this:http://social.msdn.microsoft.com/Forums/en-US/worddev/thread/60315605-717c-4397-84d5-96586a8b88e7[^]
12 Jul 2018 by Michael Breeden
I'm converting an ASP Classic project to .Net, The original application uses something along the line of: this.oWord=GetObject("","Word.Application"); to display an instance of Word in an iframe using an ActiveX object. The web page contains controls to do fairly sophisticated control of the...
9 Aug 2020 by Lee P Richardson
Which SPA technology should you use: Blazor WebAssembly or something more mature like Angular, and why?
31 May 2011 by Ruard
See this article (also a calculator):http://social.msdn.microsoft.com/Forums/en/vbinterop/thread/29a898df-9ee5-4cac-86bb-9693b2d64a12[^]It shows C# and vb6 code, that should help you.
31 May 2011 by Vijjuuu.
Hi All,i googled how we can added events in C# class that can be interop in VB6.0 but not able to find out any article that help me.if any one tried it before then pls guide me.here is my code.public interface ICalculator{ int Add(int Number1, int Number2); }public...
1 Jun 2011 by Vijjuuu.
Hi Ruard,Thanks for you time for giving a useful link.i found a link which explains better.here is the link that will other to check it out.http://www.codeguru.com/Csharp/Csharp/cs_misc/com/article.php/c6747/[^]
8 Aug 2012 by AS01234
Help with passing structure from unmanaged c++ dll to c# ?I am struggling with passing a structure from an unmanaged third party c++ dll back into my c# application. The dll is for a spectrometer. All of the other commands to the spectrometer work fine except this one. I am pasting more...
8 Aug 2012 by Philip Stuyck
The problem is that in the C++ structure there are pointers, you are trying to convert those to arrays and that is definitely a no go.You will have to use an intptr or something like that.I found something that should get you in the right direction here...
11 Oct 2012 by AS01234
The reference from Philip Stuyck was very helpful, but I want to also acknowledge receiving help from the company that makes the spectrometers (mightexsystems.com). I still don't like the solution, because now it uses unsafe code in the wrapper, essentially c++, to de-reference the...
27 Jul 2010 by Ant Waters
I am writing an ActiveX in C#, to be used in a legacy C++ application.It all works ok, apart from event handling.The problem is that when the event is raised in C# I get the following error: An unhandled exception of type 'System.InvalidCastException' occurred in...
27 Jul 2010 by E.F. Nijboer
Because of the different calling conventions you are dependant of the wrapper. If you search with google you soon will find proof of this.
11 Nov 2010 by lester555
Hi guys,I have datagridview (dgvProducts) I want to insert into xls file grid data with this code every range works fine but when i click this button rangeProductsName does not make anything can anybody help me ? private void btnExportInExcel_Click(object sender, EventArgs e) ...
12 Nov 2010 by TweakBird
Hi Have a look herehttp://www.codeproject.com/KB/grid/ExportDatagridviewToExcel.aspx[^]http://www.sourcecodester.com/visual-basic-net/export-datagridview-excel.htm[^]http://csharp.net-informations.com/excel/csharp-excel-datagridview[^]
27 Jan 2015 by zimmersm
Greetings. This has been bugging me for hours! I am creating a excel chart object from data in cells.Data looks like this:Time | Temp22:35:22 | 5022:35:23 | 6022:35:24 | 7022:35:25 | 6522:35:26 | 5522:35:27 | 4522:35:28 | 5022:35:29 | 5522:35:30 | 6522:35:31 |...
29 Jan 2015 by JonPeltier
Include both columns in the range that you pass to SetSourceData, and make sure the top left cell is blank (remove the "Time" label). Excel will parse the range the way you want, so you don't need to specify X or Y values.
29 Jan 2015 by JonPeltier
Weird about leaving the entire first row blank. Those (except for the first column) should be used as series names (legend entries) in the chart.Maybe now with the axis code gone, you could try again with only the first cell blank.
17 Jan 2012 by hulzi
Hello,I have installed an Excel AddIn (automation excel AddIn - mscoree.dll)This AddIn has an Function called MyFunction.When i start Excel.exe the AddIn will be loaded (LoadBehavior = 3, OPEN = /A "MyAddIn")I can see and use MyFunction, but when i use the...
17 Jan 2012 by hulzi
after 3 days debugin and afert poste my problem i have the solution :-)m_ExcelApp.AddIns(mscorre.dll) says, that the AddIn (Automation AddIn) is installed.But this is wrong.You have to set the property to false.Then Register the .dll again and set the property to true.foreach...
20 Aug 2012 by Zsombi55
I have an Excel 97-2003 .xls spreadsheet converted from .dbf using C#-4.0 and Excel.Interop. The data is sorted by date according to column D.http://www.tiikoni.com/tis/view/?id=af4cf69[^]Now I would need to sort the selected range (shown in the image), by column G so that blank cells...
16 Aug 2012 by Kenneth Haugland
Here is how you would sort a sheet based on one column:http://msdn.microsoft.com/en-us/library/wxks80sb.aspx[^]And here is how to filter the collection:http://msdn.microsoft.com/en-us/library/microsoft.office.tools.excel.worksheet.autofilter%28v=vs.80%29.aspx[^]Filter with more than...
7 Sep 2012 by Zsombi55
In the end I managed to do it like this.A "datagroup" is a group of rows which have the same values in column(D) DATE, grouped by days. "type" is not really relevant, it is just because in my DataSet.Table[0]'s I have a column in which there are two possible values, and according to the...
21 Jun 2017 by kozmikadam
Hi everyone, I'm working with Excel files on this days. I need to insert a column beetween some others. I'm using this code and it's works fine. Excel.Range araAt = raporWrkS.Range["K1"]; ...
21 Jun 2017 by Bhola Ram Sahu
You can get column name from the bellow code. Then you can put new column name. Excel.Application xlApp = new Excel.Application(); Excel.Workbook xlWorkbook = xlApp.Workbooks.Open("workbookname"); Excel.Worksheet xlWorksheet = xlWorkbook.Sheets[1]; // assume it is the first sheet ...
21 Jun 2017 by kozmikadam
Here is the solution. First of all i get column count with a for loop. I count every column in this loop. Already have this loop also. And then convert the count of column to alphabetical version with this code. private string GetExcelColumnName(int columnNumber) { int dividend =...
22 Jun 2017 by Patrice T
I wonder why you are using those coordinates which is a GUI thing for users ? Why don't you tell your program to use directly the column number ? Excel.Range araAt = raporWrkS.cells(columnNumber,1); araAt.EntireColumn.Insert(Excel.XlInsertShiftDirection.xlShiftToRight,...
10 Oct 2013 by basvo
Hello guys,I've been working on a c# project recently. It reads selected info from all sheets in a certain folder, and puts them in a access database and also makes a report in cr.Now when I run my appliction it works great and does eevrything it is supposed to do, but when it is...
27 Sep 2010 by ASysSolvers
I am having some issue in my code which is showing video using vlc interfacing and at the same time I'm showing an overlay on the top of video full screen using Form transparency capability. But this is fine in my Windows 7 PC and it is getting flickering in XP machine.If you know the...
27 Sep 2010 by keyur soni
Use flash video file and play it into flash player.
28 Sep 2010 by anshudutta
Is your video overlayed on your form. You can use the following code and trypublic static void SetDoubleBuffered(System.Windows.Forms.Form c) { if (System.Windows.Forms.SystemInformation.TerminalServerSession) return; ...
11 Apr 2013 by Member 9565931
Hello,I use a WebBrowser control to open an Excel file.The problem is that if there is already an open Excel before, the WebBrowser uses the same instance of Excel (Application).Is there a method to indicate that the WebBrowser should create a new instance of Excel?Or is it...
13 Apr 2013 by Maciej Los
If i understand you well...MS Excel is a single-instance application, which means that Excel will open next file in the same instance. To force creating another instance, using Interop, you need to open it using new keyword.Excel.Application oExcFirstInstance = new...
17 Sep 2015 by mccaber82
I have a requirement to programatically (in C#) either switch on or off the hanging indent of a particular paragraph.I have created an add in, with a button that when clicked, executes code where I (attempt) to do this. Its a toggle, so first click adds the Hanging indent and second click...
24 Sep 2015 by mccaber82
To anyone who needs this solution:try{ // Loop through each footnote in the word doc. foreach (Footnote rngWord in Microsoft.Office.Interop.Word.Application.ActiveDocument.Content.Footnotes) { // For each paragraph in the footnote - set the indentation. ...
20 Jul 2011 by Member 8015046
I have the following code#include "stdafx.h"#include "tchar.h"#include // Import the type library.#import "C:\Users\sl9400\Documents\Visual Studio 2010\Projects\ProgramCommunicationBridge\CnsServiceLibrary\bin\Debug\CnsServiceLibrary.tlb" raw_interfaces_onlyusing namespace...
20 Jul 2011 by Albert Holguin
Your interface class implementation should probably be contained within your namespace.
6 May 2011 by AspDotNetDev
This demonstrates how you can call a C# method in a Windows Forms application from JavaScript that is hosted in a webpage inside a WebBrowser control on your form.
6 Sep 2010 by BaptX
Hi there,I have a question about Interop between C# and C/C++. That's the situation :- I need to develop a C# dll (MS VS2010)- A c++ software (C++ Builder IDE) must call this dll in order to do some stuffThis is the code of the calling method (C++) :// Loading DLLif (enCr ==...
6 Sep 2010 by ARopo
.NET dlls can be loaded dynamically using LoadAssembley. You can't call a .net dll directly from C++ unless it is a mixed managed and unmanged dll using /CLR. What I would do in you situation is to create a mixed C++/.NET dll to wrap your c#.Net DLL then call the C++/.NET dll directlt...
6 Sep 2010 by BaptX
If I understand properly, you said I need to create a DLL which will do interface between my C++ Software and the C# DLL ?Software --> Mixed DLL --> C# DLLIs that right ?I will search on google some informations about mixed DLL.
6 Sep 2010 by Ketan D Kulkarni
If you want take C# dll in to native VC++ (VC 6.0 ) runtime then you may register C# dll as COM class using regasm.exe and call functions ...and If you are building your projects in vc++ ( VC++ studio 2008 ) with /clr option then you can just add reference of C# dll in C++ software project...
20 Apr 2015 by eswarpabolu
I have an unmanaged DLL that exports only a C style factory method that returns a new instance of a class (simplified here to look simple).hello.h#if defined(HWLIBRARY_EXPORT) // inside DLL# define HWAPI __declspec(dllexport)#else // outside DLL# define HWAPI ...
21 Apr 2015 by Sergey Alexandrovich Kryukov
eswarpabolu wrote:I have the source code for C++ solution. But what iI though was not to touch C++ source. If there is any possibility to do it in C#, it would be great.I still suggest you to modify C++ source, because it would give you a serious benefit. But you don't need to modify any code....
15 May 2014 by Tony Hallett
Hi, I have been writing some Pinvoke code for lower level WinAPI Access Control functions. I have a pointer to Privileges associated with my access token from the TOKEN_ACCESS_INFORMATION and I am looking at the privileges. I have working code but decided to refactor part of it to a...
31 Oct 2012 by zaeemi
Hi Everyone,I'm trying to connect a specific device to my application in Silverlight environment, the provided dll is not usable in Silverlight so I tried using it as a COM object an late binding...everything is fine, object is created in run-time and almost all methods are doing well...
11 May 2011 by CoolFijiKid
Hi Everyone,I've created a small C# application which extracts attachments from outlook emails and saves them to a network location. I can open all of the saved files except for compressed files with "zip" extension.Files with the "zip" extension can only be opened/extracted via Windows...
11 May 2011 by Sergey Alexandrovich Kryukov
How do you know it is a valid e-mail?What happens if you save whole e-mail in a file, name is as *.eml and open in Outlook Express (bundled with all Windows versions)? Can you save and open binary files from e-mail sections.Open the file with text editor. Even if the e-mail contains binary...
11 May 2011 by Manish Ranjan Kumar
This is the peace of code i tried which works fine.Can you please test it.Application app = new Application(); NameSpace nameSpace = app.GetNamespace("mapi"); MAPIFolder defaultFolder = nameSpace.GetDefaultFolder(OlDefaultFolders.olFolderSentMail); ...
11 May 2011 by CoolFijiKid
Hi Everyone,Thanks for providing suggestions for my issue. I managed to get to the bottom of the issue. The problem I was having wasn't caused by the code I posted earlier. After posting my issue on the forum, I had a closer look at what I was doing within my code and found that at a...
14 Nov 2014 by Member 10562713
I am using microsoft.office.interop.excel to read from excel sheetWhen a column in excel is empty..i check for !(string.isnotnullorempty(wrkbk(cell)) but it always breaks saying cannot bind at runtime for null reference.does someone have an implementation for reading excel and inserting...
14 Nov 2014 by .Net Jim
Check this out...Faster MS Excel Reading using Office Interop Assemblies[^]
17 Apr 2013 by Member 9565931
Hello,I created a new Excel application with:Application xlApp = new Application ();Workbooks wbs = xlsApp.Workbooks;Workbook wb = wbs.Add (1);...If the user opens "by hand" an Excel file, it will open in this instance.If an Excel file is opened before the code is executed,...
17 Apr 2013 by CHill60
Have a look at the solutions and comments to this similar problem (leave a comment to this solution if it doesn't quite fix your problem)Problem with Excel object[^]
17 Apr 2013 by Maciej Los
If you want to check if MS Excel has been previously opened, see this: http://msdn.microsoft.com/en-us/library/system.runtime.interopservices.marshal.getactiveobject.aspx[^]. If not, please, be more specific and post a comment, and i promise to improve my answer.
17 Apr 2013 by Thomas Barbare
You can change values of the default program for .xls in the Windows registry.A link to the Registry class
2 Jun 2011 by R. Hoffmann
Hi guys,Apologies in advance for the long post!I have to change the colours of the slices in a pie chart to automatic, using COM automation. In other words, I need to programmatically achieve the same as if I had right-clicked a pie chart in Excel (2007), selected "Format Data...
2 Jun 2011 by Maciej Los
In your example, you need to ClearFormats for ChartArea and then set ChartType and other options:In Excel VBA:Option ExplicitSub SetAutoSlices()Dim chrt As Chart, chrtA As ChartArea, chrtG As ChartGroupDim wsh As WorksheetOn Error GoTo Err_SetAutoSlicesSet wsh =...