run time error 91 in word 2002

G

Guest

I created a macro in word...I want word to use this macro on startup. I type
in the switche /mmacroname right after the target for winword.exe (shortcut)(
yes with a space after the " ) When i click on word to open up..i get this
stupid run time error 91 object variable or with block variable not set. It
is soooooo easy to to the same thing in excel!! Wonder why microsoft is not
STANDARD !!!!!
My macro only has one line!!! I just want it to justify my text instead of
justify left by default (btw its for a lazy client )

I use windows 2000. I tried it on XP and it does the same thing.

Any help would be appreciated, thank u
Sylvie
 
S

Suzanne S. Barnhill

You can accomplish the same thing by naming your macro AutoExec or AutoOpen
or AutoNew, but any of those is a hamhanded approach to the problem, which
should be solved by modifying the paragraph style instead (but I strongy
recommend against modifying the Normal style to be justified since most
other styles are based on it).

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
G

Guest

Hello Suzanne, THank you for the advice.
Whenever I do a macro though, being anything I put in it, and call it
AutoOpen it just wont do anything when I open Word. No errors, but also its
not executing it !!
Any suggestions what I might be doing wrong???
Im on windows 2000 pro running word 2000
Thank you again :)
Sylvie
 
S

Suzanne S. Barnhill

An AutoOpen macro runs when you open a document. AutoExec runs when you
start Word, AutoNew when you create a new document.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
G

Graham Mayor

There are a number of things that could be wrong here. Where are you saving
the macro? Is it supposed to act on all new documents? In that case it
should be in normal.dot. It should also be called AutoNew as AutoOpen is for
existing documents.

Frankly no matter how stupid or lazy your client, this is a very poor method
for setting justification that could introduce more problems than it solves.
You need to set justification as a paragraph style attribute.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

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

Similar Threads

Run-time 91 0
Run time error 91 1
Macro Error 8
run time error 91 3
runtime error '91' in Word 2003 1
Need Help.. run-time error 91 5
Exiting Word 2003, Run Time error 91 2
Runtime Error "91" 2

Top