nothing works to initialize Word application object from class module

R

richardconers

I've using Word XP. I'm trying to initialize an Application object
created in class module but nothing i've tried works. [when i
manually initialize the object, the procedure in the class module
works fine until I close down Word--i just can't get the initialize
code to work. So rather than test the initialize code, I went for
something simple to test whether AutoExec was firing (which it
wasn't).

Here's what I've tried to test making an AutoExec work:

In a regular module in the Normal template, I've got a module named
"AutoExec" and a procedure called Main:

Public Function Main()
MsgBox "autoexec works"
End Function

it didn't work.

I deleted that "AutoExec" module and then in another regular module I
have this code:

Public Function autoexec()
MsgBox "autoexec works"
End Function

it didn't work.

Then i tried a startup switch in the Run menu of Windows :
"C:\Program Files\Microsoft Office\Office10\WINWORD.EXE/mautoexec"

It didn't work. I got an error saying that Windows couldn't find the
path.

Anything else I can try????
Thanks!!!!!!
 
R

Russ

http://support.microsoft.com/kb/210565
http://wordprocessing.about.com/od/customizingword/qt/AutoExecMacro.htm
I've using Word XP. I'm trying to initialize an Application object
created in class module but nothing i've tried works. [when i
manually initialize the object, the procedure in the class module
works fine until I close down Word--i just can't get the initialize
code to work. So rather than test the initialize code, I went for
something simple to test whether AutoExec was firing (which it
wasn't).

Here's what I've tried to test making an AutoExec work:

In a regular module in the Normal template, I've got a module named
"AutoExec" and a procedure called Main:

Public Function Main()
MsgBox "autoexec works"
End Function

it didn't work.

I deleted that "AutoExec" module and then in another regular module I
have this code:

Public Function autoexec()
MsgBox "autoexec works"
End Function

it didn't work.

Then i tried a startup switch in the Run menu of Windows :
"C:\Program Files\Microsoft Office\Office10\WINWORD.EXE/mautoexec"

It didn't work. I got an error saying that Windows couldn't find the
path.

Anything else I can try????
Thanks!!!!!!
 

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