Word Visual Basic "Error 5" at start-up

K

Karin

(Suddenly) When I start up Word 2007 I get a dialogue box with the following
message (I can't copy and paste either or I would put it here):


Visual Basic


Runtime error '5':

Invalid procedure call or argument



Four buttons: CONTINUE (greyed out), END (just brings up the same dialogue
box again), DEBUG (greyed out), HELP (info doesn't help)

Often get "Word Restarting" followed by "Restart Failed"...

I am able to use Word if I open it in Safe mode by holding down the CTRL key.


I've tried loading my CD and doing "REPAIR" -- no change. Tried running MS
Office Diagnostics (it was recommended to me on screen saying that I was
having frequent crashes) -- no problems found.


Thanks for any and all help,
 
J

Jay Freedman

(Suddenly) When I start up Word 2007 I get a dialogue box with the following
message (I can't copy and paste either or I would put it here):


Visual Basic


Runtime error '5':

Invalid procedure call or argument



Four buttons: CONTINUE (greyed out), END (just brings up the same dialogue
box again), DEBUG (greyed out), HELP (info doesn't help)

Often get "Word Restarting" followed by "Restart Failed"...

I am able to use Word if I open it in Safe mode by holding down the CTRL key.


I've tried loading my CD and doing "REPAIR" -- no change. Tried running MS
Office Diagnostics (it was recommended to me on screen saying that I was
having frequent crashes) -- no problems found.


Thanks for any and all help,

The problem is caused by a bad or corrupted macro in either the Normal template
or an add-in. Starting in Safe mode bypasses those macros, which is why it
allows Word to start. The repair mechanism doesn't look at macros in templates.

See http://word.mvps.org/FAQs/AppErrors/ProbsOpeningWord.htm for instructions.

The article was written for versions of Word up to 2003. For Word 2007 there are
two minor differences:

- the Normal template is named Normal.dotm instead of just Normal.dot, and

- the dialog where you check the path to the Startup folder is found by clicking
the Office button, Word Options, Advanced, scrolling to the bottom of the
screen, and clicking the File Locations button.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so all
may benefit.
 
K

Karin

Thanks, Jay, but no joy yet.

Here are the additional steps I've taken:

1. Renamed normal.dotm (btw, the only file I could find was a shortcut) to
normal.old; started Word; Was asked about reloading "Normal" and responded
YES; same error occurs.

2. Thought perhaps I shouldn't have responded YES, so changed normal.dotm
to normal.old2; started Word; no message about loading Normal template; same
error.

3. Checked STARTUP folder; it's empty; tried a third time with results
same as #2.

4. Ran "Registry Mechanic" ; tried Word again with same results as #2.

Your help is appreciated!!
 
J

Jay Freedman

If the Normal.dotm file you renamed was a shortcut, that won't do.

The default path to Normal.dotm is a hidden folder. To find it, see it, or
do anything with it, you first have to turn on the display of hidden folders
and files. In Windows Explorer (also called My Computer), click Tools >
Folder Options, click the View tab, and set it to show hidden folders.

You should be able to go straight to the proper folder by pasting this path
into the Address box of Windows Explorer and pressing Enter:

%appdata%\Microsoft\Templates
 
K

Karin

OK. With your path I was able to find the file (I had "view hidden files"
enabled but the file didn't show up in the Vista serch results on my
computer) and changed it to .old. Problem continues and now the error
message is follwed with a "...not working correctly and shutting down...".

A new Normal.dotm file was created in the same folder.
 
J

Jay Freedman

Hmm, that's not good. You can go back into the folder, remove the new
Normal.dotm, and rename the old one back again to see if that stops the
"shutting down" message.

The fact remains that a Visual Basic error happens when Word tries to load a
macro that contains a mistake. The macro could be in Normal.dotm, in an add-in,
or in a document (if you start Word with a document other than the default blank
one). If Normal.dotm doesn't contain any macros, and you're starting with a
blank document that also doesn't contain any macros, the only thing left is an
add-in of some kind. Here are links to two articles about tracking down add-ins:

http://www.word.mvps.org/FAQs/Customization/CheckIfAddinsInstalled.htm
http://office.microsoft.com/en-us/assistance/HA011514521033.aspx
 
K

Karin

Thanks for your help, Jay.

I think I may have identified the culprit: Nitro PDF Professional. I
changed the Word security setting to "disable macros with notification" at
start-up. It starts up wihtout the error 5. When I enable the macro the
error 5 appears. You agree it's the villian? Another problem though. When
exit Word I get a "Microsoft Word has stopped working" message. It attempts
to recover and fails. I have to click the Close Program button. Your
thoughts?
 
J

Jay Freedman

It sounds likely that you have found the right add-in. It isn't one I'm familiar
with, but if it tries to add any menus or toolbar buttons (intended for Word
2003 or earlier) it could be incompatible with Word 2007. You can contact the
company that makes the program to see whether they have an update. Microsoft
also has a PDF plug-in, a free download from
http://www.microsoft.com/downloads/details.aspx?FamilyId=F1FC413C-6D89-4F15-991B-63B07BA5F2E5
-- it may or may not have all the features you need.

Now that you can get into Word, I suggest you click the Office button, Word
Options, Resources and click the Diagnose button. That may find -- and maybe
even fix -- whatever has gone wrong with your installation. Unfortunately,
there's nothing in the information you've posted that gives even a clue to what
that is.
 
K

Karin

Thanks for the suggestion but no problems found. Same issue when I exit. I
did notice this time a brief message in the lower left tray "connecting to
printer. Press ESC to dicontinue" (which I didn't do). I that a clue?
 
J

Jay Freedman

Is it a clue? It could be. (Can you tell I'm grasping at straws?) Word does tend
to get upset if it can't talk to the printer driver (that is, the software, not
necessarily the physical printer), although I don't know why that would cause an
error during shutdown.

Is this computer on a network with a networked printer? If so, make sure the
printer driver (the software that gets installed when you use the Add Printer
wizard in Start Menu > Settings > Printers & Faxes) is installed on your local
hard drive and not just on some remote print server.

If the printer is directly attached to your computer, it may be worth trying a
reinstallation of the printer driver software. (If you can't find the disk that
came with the printer, you can usually download a copy from the printer
manufacturer's web site.)
 

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