Word 2003 Macro Runtime Error 5479

S

Steve W.

I have a set of macros. During their running, one of the
acts preformed is copying strings stored in a table on one
document and pasting the strings into a second document.
When I am done with the first document (containing the
table) I issue a
ActiveWindow.Close
line of code.

Yes, it is the Active window. I use the
Windows(ID#).Activate line to switch between the two
documents.

I've had these macros running since Word98 and this has
always worked, but now with Word 2003 I get a
Runtime Error 5479
"Cannot Close Micorsoft Office Word because a dialog box
is open.
Click OK, Switch to Word and close the dialog box."

Needlees to say, there is no OK button, just an End and
Help, if running live.
And a added Debug button if in debug mode.
The Help button brings up nothing and the debug button
highlights the above mentioned 'ActiveWindow.Close"
line of code.

Anybody know what's going on here now? I can't find
anything in the knowledge base that seems to help.
Thanks,
Steve
 
A

Alex Ivanov

Maybe instead of ActiveWindow
activedocument.Close wddonotsavechanges
will help?
 
S

Steve W

Thanks, I'll give that a try.

After my posting I did find a KB Article #827732 with
a similar complaint. It talks about a template with an
autoexec macro in the startup directory.
I do have such a template, but all it does is create a
customized drop down macro menu/toolbar when Word is
opened.
The only advice it gives is to delete the template.
Is there some place else I could/should be running this
autoexec marco so that I get my macro menu when Word is
opened?
Steve
 

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