64bit Addin doesn't load in Outlook 2019 64bit

Add-in Express™ Support Service
That's what is more important than anything else

64bit Addin doesn't load in Outlook 2019 64bit
 
Subscribe
Andrei Smolin


Add-in Express team


Posts: 16334
Joined: 2006-05-11
Nick,

There's no information in the registry (see the type library) or in the add-in itself that could prevent the add-in from getting loaded in *any* Office version. In other words, once registered, an add-in will load in whatever Office version you install on that machine.

There's a possibility though that that specific Outlook is set so that your add-in doesn't load. Say, this may occur if Outlook requires all add-ins to be digitally signed and your add-in isn't signed. Or, it doesn't allow any add-in to load. Check File | Options | Add-ins | Trust Center.

Another possibility is: you incorrectly register your add-in. As you know, your add-in is 1) an Office extension of the COM Add-in type, 2) it is a COM class stored in the COM DLL. As to your add-in, being an Office extension, it is registered for the current user only: see the RegisterForAllUsers property of the add-in module. On the other hand, you register the COM class for all users; there is no INI file described in section Registering with User Privileges, see the PDF file in the folder {Add-in Express}\Docs on your development PC. With this combination of settings, your add-in is for admin users only as only an admin user may registeri it; the add-in won't load if a non-admin user starts Outlook.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 09 Sep, 2019 07:22:49 Top
Nick Malden Malden




Posts: 23
Joined: 2007-09-25
Hi Andrei

Thank you for your patience. I have checked all your suggestions but they don't make any difference.

I have loaded Office 2019 64bit on two machines running Windows 10 and my dll will not load in either. It does load in Office 2010 and 2017 64bit, so it must be some Office setting that I am missing.
For now I will develop using Office 2010 as I can't spend any more time on this and will come back when complete.

Kind regards
Nick
Posted 09 Sep, 2019 09:54:16 Top
Andrei Smolin


Add-in Express team


Posts: 16334
Joined: 2006-05-11
I see. If you have time, also check troubleshooters below.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader

---
Add-in is inactive

This occurs if the user turns off the add-in or if the add-in generates an unhandled exception at startup.

Symptoms.

Office 2007-2013: The add-in is listed under the Inactive Application Add-ins category and the add-in is not checked in the COM Add-ins dialog.
All Office versions: The add-in is not checked in the COM Add-ins dialog.

Suggestions. Enable the add-in in the COM Add-ins dialog. If this creates/rewrites an adxloader.log, then follow the instructions in Troubleshooting add-in loading. Otherwise, see Add-in is not registered.

---
All Application add-ins are disabled by user

This occurs if the user has chosen to disable all application add-ins.

Symptoms.

Office 2007-2013: The add-in is listed under the Active Application Add-ins category; the add-in is checked/ticked in the COM Add-ins dialog; clicking the add-in in the dialog displays the message "The add-in you have selected is disabled by your system administrator."

Suggestions. Uncheck/clear the Disable all application add-ins checkbox.

---
All application add-ins are disabled by administrator

This occurs if the administrator has chosen to disable all application add-ins.

Symptoms.

Office 2013: No add-ins are listed under the Active Application Add-ins category; the add-in is not checked/ticked in the COM Add-ins dialog you cannot set it; clicking the add-in in the dialog displays the message "Not loaded. The user selected to disable macros".

Suggestions. See http://support.microsoft.com/kb/2733070 for details. Contact system administrator.

---
Add-in is disabled

Office can disable the add-in if it crashes the Office program.

Symptoms.

Office 2007-2013: the add-in is listed under the Disabled Application Add-ins category.
Office 2007-2013: the add-in is listed under the Disabled Application Add-ins category.
Office 2002-2013: the add-in is listed in the Disabled Items dialog.

Suggestions. Open the Disabled Items dialog and enable the add-in. Look for the cause of the issue; debug the add-in.
Posted 09 Sep, 2019 10:07:11 Top
Nick Malden Malden




Posts: 23
Joined: 2007-09-25
I've used another machine to generate the 64 bit dll and that now loads into Outlook! So I can now get to the actual business of looking for the senders SMTP address. I have come up with this by trawling your forums. The one thing I can't translate from some C# code I found are the two lines that are commented out (compile errors). Do I need them? Am I freeing the objects correctly? Any advise gratefully received. Thank you in advance.

function TAddInModule.GetSMTPAddressViaOutlookObjectModel(IMail: _MailItem): string;
var
  EmailAddr: string;
  oSender, exchUser: oleVariant;
  lvNMail : MailItem;
begin
   Result := '';
   EmailAddr := '';

   try
     try
      lvNMail := IMail.Reply;
      EmailAddr  := lvNMail.Recipients.Item(1).Get_Address;
      oSender := oleVariant(IMail).Sender;

      if (not VarisNull(oSender)) and (POS('@', EmailAddr) = 0) then
      begin

//      if (osender.AddressEntryUserType = OutlookApp.OlAddressEntryUserType.olExchangeUserAddressEntry) and
//         (osender.AddressEntryUserType = OutlookApp.OlAddressEntryUserType.olExchangeRemoteUserAddressEntry) then
        begin
           //Use the ExchangeUser object PrimarySMTPAddress
           exchUser := oSender.GetExchangeUser;
           if not VarisNull(exchUser) then
             if not VarisEmpty(exchUser) then
               EmailAddr := exchUser.PrimarySmtpAddress;

        end;

      end;

   except
      EmailAddr := '';
   end;;

   finally
      lvNMail.Delete;
      exchUser := null;
   end;


   Result := EmailAddr;

end;

Posted 10 Sep, 2019 05:20:07 Top
Andrei Smolin


Add-in Express team


Posts: 16334
Joined: 2006-05-11
Hello Nick,

These are available in Outlook 2010+.

See https://docs.microsoft.com/en-us/office/vba/api/outlook.addressentry.addressentryusertype and https://docs.microsoft.com/en-us/office/vba/api/outlook.oladdressentryusertype.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 10 Sep, 2019 05:38:19 Top
Nick Malden Malden




Posts: 23
Joined: 2007-09-25
Hi Andrei
Thanks, but I've already seen the VB and c# versions, but I can't get the delphi version for

//      if (osender.AddressEntryUserType = OutlookApp.OlAddressEntryUserType.olExchangeUserAddressEntry) and 
//         (osender.AddressEntryUserType = OutlookApp.OlAddressEntryUserType.olExchangeRemoteUserAddressEntry) then


Can you tell me where these properties are in the OutlookApp please?

Thanks
Nick
Posted 11 Sep, 2019 05:36:03 Top
Dmitry Kostochko


Add-in Express team


Posts: 2839
Joined: 2004-04-05
Hi Nick,

Please see the values below. You can find them in the Outlook2010.pas source file, see the <DELPHI_INSTALLATION_FOLDER>\OCX\Servers sub-folder.


// Constants for enum OlAddressEntryUserType
type
  OlAddressEntryUserType = TOleEnum;
const
  olExchangeUserAddressEntry = $00000000;
...
  olExchangeRemoteUserAddressEntry = $00000005;
Posted 11 Sep, 2019 09:38:23 Top