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.
Discover the Power of Microsoft Office This beginner-friendly guide reveals the expert tips and strategies you need to skyrocket your productivity and use Office 365 like a pro. Mastering software like Word, Excel, and PowerPoint is essential to be more efficient and advance your career. Simple lessons guide you through every step, providing the knowledge you need to get started. Check out Microsoft Office 365 For Beginners today!
Bookmarks are a great boon in developing and working with documents--"until someone deletes them. When it comes to ...
Discover MoreNeed to get rid of a lot of bookmarks all at once? Word doesn't provide a way to do it, but you can use the short macro ...
Discover MoreIf you develop a macro that needs to work with bookmarks defined in a document, it is inevitable that you will need a way ...
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