Runtime error 4605 - command not available

P

Paul_

I assigned the command
Selection.LanguageID = wdEnglishUS
to a keyboard shortcut in Word 2000.

If I click on 1 textbox and execute the macro
it works. The language is changed to American.

But if I mark 2 text boxes at the same time
and excute the macro I get runtime error 4605.

The message is something like:
"This method or attribute is not available because the object
refers to a drawing object."

Is it possible to make the macro work for
more than 1 text box ?

Thanks for any tips.
Paul
 
W

Word Heretic

G'day Paul_ <[email protected]>,

You could set the id for each para in the selection, this would solve
the problem

Dim Para as Paragraph

For Each Para in Selection.Paragraphs
Para.Range.LanguageId=wdEnglishUS
next

Set Para = Nothing

Steve Hudson - Word Heretic
Want a hyperlinked index? S/W R&D? See WordHeretic.com

steve from wordheretic.com (Email replies require payment)


Paul_ reckoned:
 

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