Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I've created a C# object in a DLL that is loaded in the Excel process.
During the object's initialization, it creates new Excel toolbars and attempts to place icons on the toolbar. The code I'm using to get these icons is the following: sealed private class ConvertImage : System.Windows.Forms.AxHost { private ConvertImage() : base(null) { } /// <summary /// Convert System.Drawing.Image to stdole.IPictureDisp. /// </summary /// <param name="image"</param /// <returns</returns public static stdole.IPictureDisp Convert (System.Drawing.Image image) { return (stdole.IPictureDisp)System. Windows.Forms.AxHost .GetIPictureDispFromPicture(image); } } Then a call is made: IPictureDisp pic = ConvertImage.Convert(image); However, if this code is executed on a machine with Office 2002, then upon exiting Excel I get an error window ("An unexpected error has occurred" with the checkbox to restart Excel). If I comment out the call to GetIPictureDispFromPicture or if I run on a machine with Office 2003, there is no problem. Is there any way around this problem? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel 2002 and 2000 crash with Combobox on worksheet | Excel Programming | |||
Outlook 2002 calendar dates exported to Excel 2002 sort incorrectl | Excel Worksheet Functions | |||
Access 2002 VB Module controlling Excel 2002 spreadsheet -Run-time | Excel Programming | |||
Can you print labels using Excel 2002 in a Word 2002 mail merge? | Excel Discussion (Misc queries) | |||
Excel 2002 files attached to Outlook 2002 EMails change size | Excel Programming |