Using my own class in macro.

M

MrKrich

I am writing a macro in MSWord document and I have my own
class (dll file create from VB6). I use this dll file in
my macro, set reference to this dll file. It works fine.
I can use my class's object from my macro. The problem is
when I take this MSWord document and also dll file to
other computer, my macro get error message and I think it
is because it can not find dll path. Does it have any way
to put the dll file in the same directory as MSWord
document and macro in MSWord document can automatically
refer from it rather than I have to register class into
ervery computer that MSWord documet is used?
 
J

Jonathan West

Hi MrKrich

To get the VB6 DLL to work on another computer it must be registered there.

The simplest way of doing this is to type the following into the Run dialog
in windows, once you have copied the file over.

regsvr32 "full pathname of your dll"

If there are spaces in the pathname, you will need to enclose it in quotes.
 
M

Michael Hopwood

You have to register the dll with the OS, use the regsvr32.exe thus:

regsvr32.exe C:\MyPath\MyDLL.dll
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top