Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6534331
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T10:14:16+00:00 2026-05-25T10:14:16+00:00

I am writting an MS Excel COM-Addin in Delphi 2006. I’m have Excel 2007

  • 0

I am writting an MS Excel COM-Addin in Delphi 2006. I’m have Excel 2007 installed on my development machine.

I started the project as an ActiveX Library and then added an Automation object from the Delphi ActiveX project menu.

In my automation object I defined the IDTExtensibility2 interface as

IDTExtensibility2 = interface(IDispatch)
  ['{32E456FC-C710-43AA-9ACA-DDE8F132B91B}']
  function OnAddinsUpdate(var w_Custom: OleVariant): HResult; stdcall;
  function OnBeginShutDown(var w_Custom: OleVariant): HResult; stdcall;
  function OnConnection(const w_Application: IDispatch; w_ConnectMode: Integer;
                      const w_AddInInst: IDispatch; var w_Custom: OleVariant): HResult; stdcall;
  function OnDisconnection(w_DisconnectMode: Integer; var w_Custom: OleVariant): HResult; stdcall;
  function OnStartupComplete(var w_Custom: OleVariant): HResult; stdcall;
end;

and implemented the interface in a class that derived from TAutoObject.

In the initialization section of the unit I call

TAutoObjectFactory.Create(ComServer, TPBSExcelAddin, Class_PBSExcelAddin, ciSingleInstance, tmApartment);

com object registers fine and shows up in Excel Addin options however it will in install in excel. I just get the error “Not loaded. An error has occurred during the loading of the COM Addin”

Can anyone see a problem with my interface? or the way I am creating the com object? is there a way to debug this?

Thank you

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T10:14:17+00:00Added an answer on May 25, 2026 at 10:14 am

    You’ve got your declaration of IDTExtensibility2 wrong. It should be:

    IDTExtensibility2 = interface(IDispatch)
      ['{B65AD801-ABAF-11D0-BB8B-00A0C90F2744}']
      procedure OnConnection(const Application: IDispatch; ConnectMode: ext_ConnectMode;
                             const AddInInst: IDispatch; var custom: PSafeArray); safecall;
      procedure OnDisconnection(RemoveMode: ext_DisconnectMode; var custom: PSafeArray); safecall;
      procedure OnAddInsUpdate(var custom: PSafeArray); safecall;
      procedure OnStartupComplete(var custom: PSafeArray); safecall;
      procedure OnBeginShutdown(var custom: PSafeArray); safecall;
    end;
    

    One thing that is crucial to remember is that methods in an interface must be declared in the correct order—you declared them in the wrong order. I also don’t know where you got your GUID from.

    I obtained this interface declaration by importing the type library for Microsoft Add-In Designer. I strongly recommend that you do the same.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm writing an Excel Addin using COM Interop from .net. I have a command
I've started writing a Com addin for Excel 2003 using C#. I'm looking for
Currently I'm writting VB functions and save them as an Excel addin .xlam file.
I'm writing a COM add-in for Word, Excel and PowerPoint. This add-in has some
Once I've finished writing an Excel 2007 VBA script how to I deliver the
I am writing a UDF for Excel 2007 which I want to pass a
I am writing a cell array of string into Excel from Matlab. I have
I'm writing an Excel-addin that implements custom Excel functions using XLAutomationAddin. In the Excel2000
According to: http://intendance.com/2011/03/31/enterprise-content-management-open-source-squiz-matrix/ They have stated: Most other open source content management systems options
I have a requirement to take the test data from Excel sheet and write

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.