COM Interop without regasm

SLaks picture SLaks · Aug 30, 2009 · Viewed 8.6k times · Source

I'm a limited user, and I need to write an Outlook macro that exposes a C# library in Outlook 2003 and 2007.

I do not have any admin privilges at all, not even at install time, so I can't run RegAsm and I can't (I assume) write a managed add-in.

Is there any way to call .Net code from VBA in this scenario, or are there any other solutions?

This is for personal use only, so an ugly hack is perfectly acceptable (so long as it works)

Answer

SLaks picture SLaks · Oct 23, 2009

I solved this by running regasm with the /regfile option, and replacing HKLM with HKCU in the resulting .reg file.