comaddin

Excel OLE - .NET COM AddIn behaves differently when Excel is embedded in an application

烂漫一生 提交于 2019-12-13 00:24:55
问题 I have a .NET (C#) addin that uses a COM Shim dll to load itself into Excel. The addin works fine without any problem when Excel is run normally. The addin displays its own custom toolbar in Excel that is used to execute different commands. When I embed Excel into another application (e.g. DSOFramer etc), the addin starts behaving strangely. It seems that if I disable a button on its toolbar then it does not get enabled again after setting the Visible property. Also, I get a bunch of "Object

Excel VBA project not getting closed

天涯浪子 提交于 2019-12-07 17:26:53
问题 I have a COM addin in which I am handling excel events. I click Alt F11 to view the VBA project related to an excel. However, when I close the workbook the Excel VBA project in the project explorer is not closed as well. It gets closed normally when my COM addin is not installed. What is going on, and what should I do differently? 回答1: The problem was with workbook objects remaining in the memory. By clearing the objects in the workbook deactivate event, the VBA project is getting closed when

Excel VBA project not getting closed

徘徊边缘 提交于 2019-12-05 22:51:16
I have a COM addin in which I am handling excel events. I click Alt F11 to view the VBA project related to an excel. However, when I close the workbook the Excel VBA project in the project explorer is not closed as well. It gets closed normally when my COM addin is not installed. What is going on, and what should I do differently? The problem was with workbook objects remaining in the memory. By clearing the objects in the workbook deactivate event, the VBA project is getting closed when I close the workbook. See this: http://social.msdn.microsoft.com/Forums/en-US/vsto/thread/377fbebc-021d

How it is correctly to implement IDTExtensibility2 interface for Office COM Add-In?

非 Y 不嫁゛ 提交于 2019-12-05 15:02:41
I am implementing COM Add-In for Outlook. I use IDTExtensibility2. I am not sure whether this is the best way of doing COM Add-Ins but I cannot change that. This interface defines five methods: OnConnection, OnStartupComplete, OnAddInsUpdate, OnBeginShutdown, OnDisconnection. I need to perform the following operations: Load configuration data from file Load registry data Start new session Create *.pst file Subscribe to Explorer events Connect to Internet Server to get some data Create menu items in the main menu Create a toolbar Add/Remove several things in Outllok (on *.pst files level)

What do I do when launching an application triggers repeating, endless Windows Installer self-repair?

醉酒当歌 提交于 2019-11-26 14:47:29
Windows Installer self-repair can cause problems for both developers , system administrators and end users . Finding the solution can be difficult if you have limited MSI experience. This is a Q&A-style answer intended as a check list for solving self-repair problems . Here are a few common problem scenarios: Repeated Windows Installer self-repair might occur whenever you launch an application on your workstation. How can this be fixed, or how can components be disabled so it never occurs again? A WiX installer may be deployed and you see repeated Windows installer self-repair whenever you try