Spell checking from VBA

Howie Jones

Registered User.
Local time
Today, 06:31
Joined
Aug 14, 2003
Messages
15
Has anyone got any suggestions as to how I can spell check a specific field using the on_exit event? I want this to be done automatically without user intervention.

I know that I can use DoCmd.DoMenuItem ... , but this has no control and spell checks the whole of the record.

Any advice or pointers gratefully recieved.

HowieJ
 
Never done it myself but you can:

i) check if user's computer has Word installed;
ii) open an instance of Word (hidden);
iii) pass the value you wish to spell check;
iv) spell check it using Word's spellchecker;
v) return to the database and flag any suggestions.

There's probably another way...but I don't know.
 
You'd need to set a reference to the Word Object Library, too.
 
Rich

No I haven't, I'll give it a try, but isn't that just a new way of using DoCmd.DoMenuItem ... ?

HowieJ
 
Hi

I've now tried DoCmd.RunCommand acCmdSpelling, and just as I thought, it wants to check the whole of the database not just the relevant field. There doesn't seem to be any way of getting hold of it and restriciting it to the current field.

Any ideas?

Howie
 

Users who are viewing this thread

Back
Top Bottom