Adding com reference on the fly

  • Thread starter Thread starter Mikael Svenson
  • Start date Start date
M

Mikael Svenson

Is there a way I can add a reference to a component on the fly in C#?

I'm adding a reference to Microsoft Word, but I want to add the
reference to the version the user is running. I have Office 2003 myself,
but unless I distribute the com.interop assemblies this makes it won't
work on another Office version.

So I'd like to check what version the user has, and use interop towards
that version.

The functions I use are the same for 2000, XP and 2003.

Guess I could install Office 2000 and add those, and it would work on
all newer versions, but that's not as elegant :)

-m
 
Back
Top