Is it possible to set a reference to a library programmatically like I
can do for an add-in?

Thanks in advance for any help.