This question already has an answer here:
So, I typed the parenthetic statement 'Asked why did he come here'. Microsoft Word suggested that I change the sentence to 'Asked why he came here'. I agreed with the correction, but when I had word explain the change, the following came up:
Order of Words If your sentence includes a statement about a question rather than a direct question, the subject should come before the verb.
It then went on to give these examples:
Instead of: He asked the bus driver when would the next bus come. Consider: He asked the bus driver when the next bus would come.
Instead of: I wonder what did they serve for lunch. Consider: I wonder what they served for lunch.
Now, I agree with the change to my sentence. It seems 'better sounding' and less awkward, and I thought that if I really wanted to keep the did, maybe the sentence would be better written: Asked 'why did you come here?'. But in the examples Word gives the subject comes before the verb in both the erroneous and correct versions.
Was Word on to an actual grammatical rule, and if so, could someone clear it up for me?