• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 753
  • Last Modified:

Turning of autocorrect in runtime (Acc 97)

In the dutch language there are several 2 character combinations forming one character (or sound). These characters then both need to be capitalized. Example: IJsland (dutch for Iceland). This obviously makes the autocorrect function that corrects "TWo INitial CApitals" unusable for any dutch application.

I know you can set the Allow Autocorrect of a field, but that would mean editing all existing forms. So that was a no go.

I just want to turn it off by default and from VBA (as in automatically). Unfortunately I can not find an easy way to do this. I would have hoped Application.SetOption would do the trick, but autocorrect is part of the common Office 8.0 option set.

I found some registry settings concerning the autocorrect options. That way I could set HKCU\Software\Microsoft\Office\8.0\Common\AutoCorrect\CorrectTwoInitialCapitals   to   00 00 00 00, but I'm not a fan of altering the registry settings.

Is there a better way to turn off this autocorrect setting?
0
patrickl
Asked:
patrickl
  • 6
  • 4
  • 4
  • +2
1 Solution
 
KangaRooCommented:
Its a property(AllowAutoCorrect) of the Text Box control which can be controlled from VBA
0
 
patricklAuthor Commented:
Yes, but as I said (I mentioned the property in the question) that would mean altering all existing forms.

I'm looking for something simpler. At this point setting the registry seems the best bet.
0
 
KangaRooCommented:
Indeed. Well, you could automate the process of going through all the forms and controls. Still, registry is less work.
From Excell this is controlled with Application.AutoCorrect object. Which Access Application object doesn't seem to recognize.
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
AlexVirochovskyCommented:
KangaRoo, i am very glad to see you here!
Alex
0
 
KangaRooCommented:
Nice too see you here too, AlexVirochovsky. Have you taken up Access programming?
0
 
AlexVirochovskyCommented:
O , that not, that i love, but ~ 4 years
i must make it! Happy new Year!
0
 
JimMorganCommented:
Although you can not change the features yourself, you can provide a facility for the users to set the autocorrect as they would like.

   DoCmd.RunCommand acCmdAutoCorrect

will bring up the autocorrect dialog box so that the users can remove the function or enter the exceptions.

This can be put on a command button or more usefully, a custom menu bar.

Jim
0
 
KangaRooCommented:
Reasonable...
Happy New Year.
Alex, won't we see you anymore this century? (I love that :)
0
 
patricklAuthor Commented:
Perhaps giving the user the ability to set the autocorrect is indeed the best way to go. Perhaps they even like having it switched on (since it sometimes does correct errors).
0
 
lmerrellCommented:
patrickl - Long time, no see!  I hope you are having a happy holiday season.

lmerrell
0
 
patricklAuthor Commented:
Imerrell, Hi there. Holiday is happy here! Hope it's happy for you too.

Just fighting these inconsistencies in Access. Why doesn't everything just work the same? Why must they (MS) change it all everytime?

Well it can be much worse though. I dread the day that I'm forced to use Access 2000. It's even worse than Access 95. What a mess! (a 150Mb run-time!!!). It seems like Access is only good on even numbered versions. (And 2.0 was the best of the lot)

Anyway, if noone knows a better option than the registry and/or the dialog then I will accept JimMorgan's answer.
0
 
lmerrellCommented:
:-)  I'm avoiding A2000 like the plague myself.  I'm waiting for all the stabilizing MS service packs before upgrading.  The only feature I am really looking foreward to is the 2 gig database size.  I've just heard too many horror stories so far.

And thanks for the wishes, the holidays have been great here.  I don't even have any Y2K duties at work.  Just champagne and football with the family!

lmerrell
0
 
patricklAuthor Commented:
It's not the answer I hoped for, but apparently I will have to make do.

Thanx.
0
 
JimMorganCommented:
What answer were you looking for?  Maybe there is a contrary way to do this and give you what you want.

Jim
0
 
patricklAuthor Commented:
Well, as I said, an automated "switch" to turn the autocorrect off. Something like:

Application.AutoCorrect = False

(That is the way it should have worked if MS were at all consistent)

However now I can:
- set the registry keys I found (which I find "dangerous")or
- leave it up to the users to switch it off (which means every user of the software has to do something).

Or I could try something funky like using SendKeys to control the autocorrect dialog (with Echo Off).
0
 
JimMorganCommented:
I just haven't found a way to get there directly from Access.  There might be a way through API calls but someone in the office seems to have 'borrowed' my API manual as I can not find it today.

If and when I do, I'll check to see if there is a way.  -  Better than mucking with the registry keys.

Jim
0
 
patricklAuthor Commented:
That would be very cool indeed.

What would you attempt to do then? Send messages to the controls on the dialog (similar to the sendkeys approach) or do you imagine there being some other way to set these properties.

I assume you are not doing this for the points, but still, I would spend a couple of hundred points extra on a "reusable" answer.
0
 
JimMorganCommented:
API calls are a pain in the you-know-what to right but once they are done, you don't have to worry about them again.

The API calls are sent to the lower bowels of Windows and makes the changes at that level.  Some functions, as you have found, just are not available directly from Access.  This allows you to go to a lower level and instruct Windows to do what Access would have done in response to a user's input.

The calls would change the AutoCorrect just as a user would.  You could turn it off in certain cases and on in others by making the right calls.

It might take a little while to find out how easy it is to do (or hard).

Jim
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 6
  • 4
  • 4
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now