Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBA for AutoCorrect replacement entries?

Status
Not open for further replies.

wordhopscotch

Technical User
Jun 20, 2008
3
US
Is it possible to use VBA to make Word (XP) distinguish between upper and lowercase entries in the AutoCorrect replacement table? I have edited it to replace shorthand with English as I type. The problem is that I have taken some of it from Speedwords, which for example uses "x" to mean "if" and "X" to mean "whether," and other useful shortenings. I would like to be able to use those, because I am not very imaginative about these things. So can it be programmed to do that, or are there limits to what programmers can make computers do? I'm a bit of a novice. Obviously :)
 
Well you can certainly compare
Code:
if Ucase(mytext) is "mytext" then
   'What i want to do
End
True = Uppercase text, false = lower case text

If the text is more than 1 char
Code:
for i = 1 to len(mytext)
  if Ucase(mid(mytext,i)) then
'this charatcer is upper case
  End if
Next i


HTH,

"Knowing that you know is the greatest sign of stupidity, knowing that you are ignorant is the best proof of intelligence.
 
Just a small suggestion, when sorting data, do not use case sensitive sorting values, because this creates chances the user will enter the wrong sorting value, for example FIX MAJ is on.

HTH,

"Knowing that you know is the greatest sign of stupidity, knowing that you are ignorant is the best proof of intelligence.
 
Although AutoCorrects are case-sensitive, it is not possible to have two which differ only in their case, so you can't do what you ask. I don't think it can be achieved without VBA and it would have to be an after-the-fact operation, it could not be done as you typed.

Enjoy,
Tony

------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.

I'm working (slowly) on my own website
 
I don't think it can be achieved without VBA and it would have to be an after-the-fact operation"

What I have typed is to be used in VBA, in what ever event he may.

Youve forced me to read his puzzling post again and I noticed he wants to work with the autocorrect replacement table.


it is not possible to have two which differ only in their case


"x" to mean "if" and "X" to mean "whether,"

Wich would render this impossible in the Autocorrect replacement table.

So he can still loop through text and replace it through visual basic.


As I read the post again I understand what he wants to do, and it is not sorting at all!

Nor does he need Vbase to do it, he is simply trying to apply a behavior that does not apply to autocorrect.



Why not use contractions that you replace i.e. hth = hope this helps, and why not learn how to type!!!

HTH,



"Knowing that you know is the greatest sign of stupidity, knowing that you are ignorant is the best proof of intelligence.
 
Excuse me sir (or madam). I have cerebral palsy affecting my hands. I have learned how to type but as you can imagine it is occasionally just a little taxing typing full English. (I am learning to code on my own time, in case someone wants to remark upon that too.) I do have my own contractions but thought I would be better served by a Speedword in some cases. It's not crucial to use a Speedword, I just wondered if I could. I see that I can't, so thank you for telling me. I appreciate it. But do please consider that someone may have a reason for asking something, even if you personally find the question strange or unnecessary. Thank you.
 
Dear wordhopscotch,

I am sorry to hear about your condition but as a user of this forum, upon reading your post there was no clear intention in what you asked.

If your neural system is affected and thus rendering you unable to type normaly, I am certain very well adapted programs are there to help you, and if this condition came late in your life, I am sure insurance covers it.

Otherwize I don't see much of a solution but to endure the relative stiffness of MSoffice programs.

Please note that my remark was to be taken litely and simply because it was the only solution with the tools that you currently posess.

Hope you get well

Julien,

"Knowing that you know is the greatest sign of stupidity, knowing that you are ignorant is the best proof of intelligence.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top