How to spell check a text box on a userform

J

JWS315

I have a userform with a textbox on it that a user can enter additional text
about a shape and I want to be able to check the spelling of any text entered
into box - can this be done via code, if so how would I accomplish it?

Thanks in advance for any assitance!

Jerry
 
A

Al Edlund

on questions like this I usually cheat. I go check the word forums for vba
answers. I then adapt there code to use under the covers in visio. To call
the word specific methods you can open a word object under the covers and use
it "invisibly"
al
 
J

JWS315

Doesn't Visio have a spell check also? I tried to cheat and create a macro
in Visio, check the spelling of text in a box but there is nothing in the
macro after it is run? I see that visio has a visCmdToolSpelling(?) that can
be used with DoCmd but not sure how to use it and pass text to it from my
userform.

Jerry
 
A

Al Edlund

Yes it does, and it appears to be the same functions as that are available
from the tool bar. The clue here is that when you use the macro recorder the
operations being called from the toolbar you don't get recorded (although the
process of repairing the character string are) the call to the add-on. This
leads (IMHO) to the conclusion that it is an unpublished add-on. You can
however call the dialog using something like this which does the whole
document.

Sub macrospell()
Application.DoCmd (visCmdToolsSpelling)
End Sub

That's why I suggested checking the Word vba examples for more granularity
on checking form content.

al
 

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