by Allen Wyatt
(last updated January 27, 2018)
Sharon received a document that includes many tables in it. She selected the entire document using Ctrl+A and then changed the language setting for the document. However, this did not change the language setting for any of the text contained within the tables. Sharon wonders if there is a way to really change the language setting for all text in the document.
In doing some testing, we found that if you have a document that includes tables, when you press Ctrl+A and change the language setting, those paragraphs in the table are also affected, just like regular paragraphs. The only time that this did not occur is if the table was in a "non-body" portion of the document, such as a text box, a shape, header, footer, endnotes, or footnotes. In those instances, the text in those elements was not affected.
The only way to affect each of these areas is to use a macro. For instance, here is a simple macro that will go through each of the StoryRanges in the document and change the language for each paragraph:
Sub ChangeLanguage() Dim r As Range Dim p As Paragraph For Each r In ActiveDocument.StoryRanges For Each p In r.Paragraphs p.Range.LanguageID = wdEnglishUK Next p Next r End Sub
The language setting, in this macro, is set to UK English. If you would like it set to a different language—and there are scores of them—you can use one of the enumerations listed on this page:
For most folks, the simple macro should work just fine. If you have a more complex document, though, you may still find some areas where the language was not changed. In that case, you may find the macro at the following page helpful:
WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (5227) applies to Microsoft Word 2007, 2010, 2013, and 2016.
Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!
There you are typing along, minding your own business, when wham! You end up in an entirely different language and you ...Discover More
Want to convert your usage of Word from one language to another? It's not as easy as one would hope, as you'll discover ...Discover More
Need to format a paragraph (or some selected text) so that it is a language other than English? You can do so easily by ...Discover More
FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
Got a version of Word that uses the ribbon interface (Word 2007 or later)? This site is for you! If you use an earlier version of Word, visit our WordTips site focusing on the menu interface.