word 2010 spell checker chokes on Camel Case

4

1

This is driving me nuts. I'm using Word to summarize books I study. Now, for a term such as

BindingOperations.ClearBinding

It first complains about why I don't have "Binding Operations". Then why I don't have "Clear Binding". And lastly, even after I add "BindingOperations" and "ClearBinding" to the dictionary, it complains aobut BindingOperations.ClearBinding!

My question is: How can I configure Word's spell checker to accept Word1Word2 and CorrectWord1.CorrectWord2 when the spelling of Word1, Word2, CorrectWord1 and CorrectWord2 are correct?

edit: I'm embarresed to say I have solved the problem. I just used dashes as in "Frame-Position" instead of FramePosition.

edit: Here's a skeleton for a word macro to solve this problem:

F8  twice (to select the word)
<control u> (to underline)
F8  twice (to extend selection to more than one word, because of a bug in Word 
    where replacing when just one word is selected replaces all across the document,
    not just across the selection )
<contrl h> (to replace)
([a-z])([A-Z])
<Alt i> (go get to the "Replace with" text box)
\1 \2
<Alt M> (for more)
<Alt U> (for wildcards)
<Alt A> (for Replace All)
<Alt N> (no replacement out of the selection)
<Alt U> (Reset the use wildcards)
<escape>

Avi

Posted 2011-12-29T21:25:05.107

Reputation: 908

It's a shame that one of the answers is marked as the answer since it does not explain how to configure Office to see ThisAsCorrect but ThisAsIncorect, which would be dead useful when writing documentation for an API. – dumbledad – 2015-03-11T10:51:15.580

@dumbledad You're correct, hence my edit. One possibility is to use Replace (Contol-H) and then Find What: "([a-z])([A-Z])" and Replace With: "\1-\2" with More/Use wildcards selected (of course, both the Find What and the Replace with without the double quotes. I also like to underline them so that they're easily recognized. – Avi – 2015-03-11T12:40:36.697

But it's not a fix, it's a workaround. Be great if at some future point if/when there is a solution that gets added as an answer – dumbledad – 2015-03-11T16:16:27.487

1and what is your question? – Baarn – 2011-12-29T21:39:01.400

yea - the complaining is correct.. because it is grammatically correct. not technically correct. Unfortunately for this purpose you need to get a technical dictionary or some other kind of checker.. or mark technical terms to be ignored.. – Piotr Kula – 2011-12-29T21:40:17.773

Normally, camel case is incorrect. This is why the medical industry has their own dictionary. – surfasb – 2011-12-30T02:33:57.090

Answers

3

Spelling -> Set Proofing Language .. -> [X] Do not check spelling or grammar.

Set this for either a paragraph style you then use for blocks of source code or individually for blocks of source/text you don't want it to spell check.

Brian

Posted 2011-12-29T21:25:05.107

Reputation: 8 439

Thanks. I'm aware of this and I'm using it for blocks of codes I copy (also use border so code samples are nicely marked). The problem, however, is that usually the explanations for the code then contain regular text paragraphs, where the camelCased words appear amidst rgular ones I do want to check.

As no answer surfaced advising me how to do this, I'll accespt your answer. – Avi – 2011-12-30T14:31:34.403

0

Microsoft word has no concept of what a camelcase word such as "camelCaseWord". So unfortunately its spell checking, or word breaking, of any camelcase word is wrong.

When hyphenating a camelcase word, the obvious places for a hyphenation is between words of the camelcase word. So the word "camelcaseWord" would get hyphenated as "camelcase-Word".

When spellchecking it should always ( or at least make an option ) to spell check a camelcase word such as "correct1Correct2Correct3" to spell check each separate word of a camel cased word independently. ( I.E. don't look up "correct1Correct2Correct3" in dictionary, but look up each of the 3 words "correct1", "Correct2" and "Correct3".

It is Microsoft's usual approach to application. Cover 80% of the use cases and call it done.

Paul Gorbas

Posted 2011-12-29T21:25:05.107

Reputation: 101

0

I have the same issue; however I'm using MS Word to document Java Source code.

My solutions so far are to either:

  • Turn off Auto Complete for specific areas of text as mentioned above (not particularly good, as the grammatical style and auto-correction for the other words in the paragraph are useful).
  • Add the word to my local dictionary; again not perfect, as it means right click > add to dictionary whenever I write a variable, method or class name and repeat the process if i transfer the document to a different instance of word.

In each case, the word is camel case. Surely there must be a decent way to get ignore any camel case word in the auto-correct given the complexity of its other features, but I haven't found it.

James

Posted 2011-12-29T21:25:05.107

Reputation: 1