Suggestions for better outlook development

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

Suggestions for better outlook development
 
Thomas Reinberger




Posts: 7
Joined: 2005-03-15
Hi,

I'm working for quite a while now with the AddIn for .NET.

During my work, I figured out several problems:

- sometimes, the AddIn produces an infinite number of errors due to problems with CommandBar Controls. The Error is something like "the control with the tag=xyz cannot be added to the Commandbar". I found that the error can have two reasons:

a) there is already a "dead commandbar" registered in outlook with that tag (e.g. from a previous build with controls where "temporary" is set to false)
b) commandbars and their controls are not declared as temporary.

For a) - just start Outlook without the addin and manually remove the commandbar
For b) I'd recommend only to use temporary commandbars and controls

Another (not yet fully understood) issue with AddIn-Express for .NET for Outlook AddIns is the correct usage of several dll's.

There is a office.dll provided by afalina and this one is referenced by default regardless the installed office version or the target office application. My question is: is this an Interop-Dll made by afalina which is suitable for office 2000,xp and 2003?

Furthermore, there is a office.dll in c:\Windows\Microsoft.NET\Framework\<version>\ - and this one also seems to be an interop dll for office. Is this version better than the previous one? Shouldn't it be used at all? And if yes: why?

Concerning outlook development, there are also several approaches for referencing the outlook object model:

a) use the PIA's from the Office 2003 installation (of course only suitable for office2003 as target platform, furthermore using these pia's is a licensing problem. AFAIK Microsoft doesn't allow deployment of these PIA's - so whenever an addin want's to be installed, the user / administrator first has to install the office2003 pia's). BTW: shouldn't be deployed at all, for they must be installed into the GAC (?)
b) use the XP PIA's. AFAIK, they're suitable for XP and 2003 and can also be deployed with the addin without violating licensing restrictions from MS.
c) when targeting office 2000, XP and 2003, one could generate the interop dlls and disassemble them to IL-code, change some visibility flags for SinkHelper-Classes (because events won't work if you don't do that) and compile that again. Of course, you'll only be able to use the office 2000 functionality, and properties like MAPIFolder.FullFolderPath have to be implemented by yourself.
d) in the afalina-sample for outlook addins, I found two more Interop-dlls - one for Office and one for Outlook. Where do you have these Interops from? Are they selfmade? Why? Which advantages do they provide?

As you can see, I'm COMPLETELY confused about the dll issue and regardless which solution I try, none works for me. Yesterday I had finished a new little outlook addIn and it worked fine on my development machine, but after installing it with the msi-installer generated by the afalina-addin, i got an installation error (something with the afalina-dll wasn't okay). Then I went to fix that issue and I also tried to make the addin compatible with older outlook versions. And that's where a ran into the problems described above.

Perhaps, someone could suggest a way of generating outlook 2000+ compatible addins with afalina without all those dll hassles....

Kind regards
Thomas Reinberger
Posted 21 Jun, 2005 04:06:32 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hi Thomas.

There is a office.dll provided by afalina and this one is referenced by default regardless the installed office version or the target office application. My question is: is this an Interop-Dll made by afalina which is suitable for office 2000,xp and 2003?

We don't provide any assemblies except the AddinExpress.MSO, Addin
Express.RTD and AddinExpress.SmatrTag. As for the office.dll, this assembly is included in the Add-in Express .NET package as a dependency automatically. The fact is that, the office.dll is not installed with .NET Framework (it is installed with Visual Studio only) and we have to distribute ADX with this assembly so that ADX-based add-ins could work on PCs where VS is not installed.

Furthermore, there is a office.dll in c:\Windows\Microsoft.NET\Framework\<version>\ - and this one also seems to be an interop dll for office. Is this version better than the previous one? Shouldn't it be used at all? And if yes: why?

This is the same dll.

a) use the PIA's from the Office 2003 installation (of course only suitable for office2003 as target platform, furthermore using these pia's is a licensing problem. AFAIK Microsoft doesn't allow deployment of these PIA's - so whenever an addin want's to be installed, the user / administrator first has to install the office2003 pia's). BTW: shouldn't be deployed at all, for they must be installed into the GAC (?)

I think there is no need to deploy PIAs 2003 because they are available for downloading. http://www.microsoft.com/downloads/details.aspx?FamilyID=3C9A983A-AC14-4125-8BA0-D36D67E0F4AD&displaylang=en

d) in the afalina-sample for outlook addins, I found two more Interop-dlls - one for Office and one for Outlook. Where do you have these Interops from? Are they selfmade? Why? Which advantages do they provide?

The Interop assemblies were generated in VS and then signed with the sn.exe utility from the .NET Framework SDK. These assemblies are required for the ADX examples. There is no need to disassemble these assemblies because ADX provides Office 2000 events-based functionality automatically using its components.

Perhaps, someone could suggest a way of generating outlook 2000+ compatible addins with afalina without all those dll hassles....

To make your add-in compatible with Outlook 2000 and higher you need to use Interop assemblies for Office 2000. You can generate them in VS or use Interop assemblies from our ADX examples.


Thomas, I don't see any problems from the described above that couldn't be fixed. If have any problems with the setup project you can send it to me. I will try to help.


Posted 21 Jun, 2005 06:51:18 Top
Sven Heitmann




Posts: 193
Joined: 2004-08-23
Sergey Grischenko wrote:
I think there is no need to deploy PIAs 2003 because they are available for downloading. http://www.microsoft.com/downloads/details.aspx?FamilyID=3C9A983A-AC14-4125-8BA0-D36D67E0F4AD&displaylang=en

Totaly missed their release, thanks for pointing to this Sergey.
Best regards,

Sven Heitmann
Posted 21 Jun, 2005 07:02:29 Top
Thomas Reinberger




Posts: 7
Joined: 2005-03-15
Thank you Sergey for your posting. Now, everything seems to be better understandable. Of course, the problem is not afalina's addin but my understanding of using it ;)

Kind regards
Thomas Reinberger
Posted 22 Jun, 2005 13:38:07 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05

Thomas, feel free to ask me any questions you have.
Posted 22 Jun, 2005 14:08:51 Top