Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

COM Interop without regasm

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)

like image 814
SLaks Avatar asked Aug 30 '09 18:08

SLaks


1 Answers

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

like image 92
SLaks Avatar answered Sep 19 '22 19:09

SLaks