Macro problem

V

Veena

Hi,

I am using Word 2000 with VB on Windows 2000.
We have created a macro (in WORD) which is called from VB through
the "Run" method.
The macro works fine.
The problem is that when i run the VB code, from visual basic IDE,
everything works fine as expected and the macro executes properly.
But, when we make the executables and run it, the application throws
the error "Unable to run the specified macro". Further, the code which
calls the macro is compiled as an ActiveX DLL.
I guess, that it could be some timing issue. The macro could be called
even before the WORD is invoked. But, this is only my guess.
Any advice would be greatly appreciated.

-Regards,
Veena.
 
C

Chango V.

I am aware of one insidious bug in Word.Application.Run when you are trying
to call it out-of-process. Just try to add a couple of dummy parameters to
your macro. This somehow solved the problem for me.

You should not have a synchronization problem. If you make a call on the
Word.Application object, COM should take care of synchronization. But it
also depends where your macro resides. Is it in a global template or in a
document?

// Chango

NOTE: This post is from an anti-spam, non-existent email address. For
further communication, please reply to the Newsgroup and/or contact me
directly at (e-mail address removed).
 

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