Please Note: This article is written for users of the following Microsoft Word versions: 2007, 2010, 2013, 2016, 2019, and Word in Office 365. If you are using an earlier version (Word 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Word, click here: Determining if Overtype Mode is Active.
by Allen Wyatt
(last updated August 7, 2021)
If you are using a macro that inserts text in a document, you might want to determine if the overtype mode is active. This is the typing mode that results in every keypress replacing an existing character in the file. If you don't check for this, your macro could have undesired results.
The status of overtype is controlled, oddly enough, by the OverType property of the Options object. If the property is True, then overtype mode is active; if it is False, then it is not turned on. The following line of VBA macro code checks the status of the overtype mode and turns it off if it is on.
If Options.OverType Then Options.OverType = False
WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (13266) applies to Microsoft Word 2007, 2010, 2013, 2016, 2019, and Word in Office 365. You can find a version of this tip for the older menu interface of Word here: Determining if Overtype Mode is Active.
Comprehensive VBA Guide Visual Basic for Applications (VBA) is the language used for writing macros in all Office programs. This complete guide shows both professionals and novices how to master VBA in order to customize the entire Office suite for their needs. Check out Mastering VBA for Office 2010 today!
Do some macro programming in VBA and you'll quickly find out that you can use functions to extend the power and ...Discover More
Need to remove extraneous characters from a text string? VBA makes it easy through the CleanString method, described in ...Discover More
If your macro needs to communicate with a user, one simple way to do it is to use a message box. Here's how to use this ...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.