Written by Allen Wyatt (last updated April 19, 2025)
This tip applies to Word 2007, 2010, 2013, 2016, 2019, 2021, 2024, and Word in Microsoft 365
Hasan has a document that includes a bookmark. He wonders if there is a field he can use to indicate the line number on which the bookmark occurs.
The short answer is no, there is not a way to do this in Word. You can obviously turn on line numbering, jump to the bookmark, and note the line number on which it occurs. Since Hasan wants a field to indicate this line number, though, it seems like he ways a way to reference that line number elsewhere.
A field would be helpful to do this, but since none exists, you need to rely on a workaround using a macro. Here's a simple macro that could do the trick:
Sub TypeBookmarkLineNumber() Dim bm As Bookmark Dim bmRange As Range Dim lineNumber As Long Set bm = ActiveDocument.Bookmarks("MBN") Set bmRange = bm.Range lineNumber = bmRange.Information(wdFirstCharacterLineNumber) Selection.TypeText lineNumber & " " End Sub
This macro assumes a couple of things. First, it assumes that you want the line number for a bookmark named "MBN." Second, it assumes that you want the line number entered in the document at the location of the insertion point.
A macro such as this is not as automatic as a field; it must be run every time you want the line number. (Obviously, this may mean deleting the line number generated by the macro the last time you ran it.) Plus, if the MBN bookmark stretches over more than a single line, it is only the line number of the first character in the bookmark that is entered in the document.
Note:
WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (9452) applies to Microsoft Word 2007, 2010, 2013, 2016, 2019, 2021, 2024, and Word in Microsoft 365.
Learning Made Easy! Quickly teach yourself how to format, publish, and share your content using Word 2021 or Microsoft 365. With Step by Step, you set the pace, building and practicing the skills you need, just when you need them! Check out Microsoft Word Step by Step today!
Bookmarks are a great boon in developing and working with documents--"until someone deletes them. When it comes to ...
Discover MoreWord has an irritating habit of placing unwanted bookmarks in a document that you've been editing for a while. These ...
Discover MoreBookmarks are commonly used in Word documents as a way to cross-reference information. If the bookmark referenced by the ...
Discover MoreFREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)
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.
Visit the WordTips channel on YouTube
FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2025 Sharon Parq Associates, Inc.
Comments