Macro Problem

D

DG

I have been using an AutoOpen and AutoClose macro to automatically switch
to/from different printers depending on the requirements of the document.
I'm using Windows XP SP3 and Word 2000. I just received a new computer and
transferred my files to the new computer - including normal.dot and
templates. When I try to open a document that had a macro, Word freezes and
I have to shut it down using Task Manager. I even tried creating a new
document, with the same kind of macro, and it does the same thing. This
never happened on my old computer. Any thoughts on the cause and what I can
do to fix it? We have four different printers and it's so much easier using
macros to switch to the correct printer when opening the document.

Note.....I have the macro security setting at medium and if I select NOT to
run the macro when the window pops up, the document will open. I have also
noticed that when allowing the macro to run, even though the documents are
freezing, it IS changing the printer selected in the AutoOpen macro to the
default printer.

Thanks in advance for any help provided.
 
G

Greg Maxey

You might put a Stop command in the AutoOpen macro then when the stop occurs
try stepping through the code one line at a time with the F8 key to
determine what line is causing the problem.


Sub AutoOpen
Stop
'The rest of your code
End Sub
 

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