Channel | Publish Date | Thumbnail & View Count | Actions |
---|---|---|---|
| Publish Date not found | ![]() 0 Views |
▶ About this video: This video tutorial shows you how to add line numbers to the right margin of a Word document instead of the default left. The tutorial will only work with Microsoft Word versions 2013, 2010 and 2007 and possibly 2003 (not tested). MS Word 2016 and later versions are not supported.
VBA code to use (copy and paste as it is) :
ActiveDocument.Sections(1).PageSetup.SectionDirection = wdSectionDirectionRtr
NOTES
• After pasting the VBA code just press ENTER. Do not attempt to RUN it like a macro.
• This is not a permanent fix. You’ll have to repeat the procedure (adding the VBA code) for all documents where you want the line numbers on the right margin.
• You don’t need to install the RTL language (Hebrew, Arabic etc). Adding it in the language settings will suffice for this purpose.
• You can remove the RTL language from your language settings after you are done editing and printing the document. New documents will however not be affected by the RTL language setting, so you can keep it if you intend to use the VBA code in the future.
• If you remove the RTL language from the settings, the line numbers are going to disappear in the edited document. Returning the language will however restore them without having to repeat this whole process. Therefore, if you intend to share or access the document on a different computer, make sure to advise the users to add the RTL language in their Word programs (2007-2013).
• An alternative to this method is using a text box on the right margin. Though it may prove more time-consuming, it’s guaranteed to work on all versions of Word.
CREDITS & MORE INFO
• This tutorial is adapted from Gregory K. Maxey’s post on the same: https://gregmaxey.com/word_tip_pages/line_numbering.html
• Superuser Answer: https://superuser.com/questions/773979/align-line-numbers-to-right-hand-side-on-odd-pages-in-word
Thank you for watching!
Please take the opportunity to connect and share this video with your friends and family if you find it useful.