Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 01-14-2021, 01:01 PM
tommydog tommydog is offline How to put line numbers on existing blank pages? Windows 7 64bit How to put line numbers on existing blank pages? Office 2016
Novice
How to put line numbers on existing blank pages?
 
Join Date: Jan 2021
Posts: 8
tommydog is on a distinguished road
Default How to put line numbers on existing blank pages?


I have a document of a few hundred pages, comprising of blank pages (different page sizes and orientations) that I wish to put line numbers on. I can enable line numbering in word, however when I hold the enter key down, and get to the end of the first page, a new page is created. I don't want this, as I want the line numbers to flow onto the next blank page. Attached is a small sample of the blank pages that I wish to fill with line numbers (various sizes and orientation). I need a quick way to do this, as in practice I will have hundreds of blank pages, and the order,orientation, size of these blank pages must be preserved. I simply want line numbers from the top to bottom on these existing blank pages. Is there a setting I can change in word to enable this, or alternatively does anyone have any example of a macro script that would work?
Attached Files
File Type: docx Blank pages.docx (11.9 KB, 4 views)
Reply With Quote
  #2  
Old 01-14-2021, 10:27 PM
gmayor's Avatar
gmayor gmayor is offline How to put line numbers on existing blank pages? Windows 10 How to put line numbers on existing blank pages? Office 2016
Expert
 
Join Date: Aug 2014
Posts: 3,382
gmayor is a name known to allgmayor is a name known to allgmayor is a name known to allgmayor is a name known to allgmayor is a name known to allgmayor is a name known to all
Default

You can only have line numbers in a Word document in there are lines in the document to number. Your 'pages' merely contain section breaks. If you fill the pages with paragraph breaks then the pages are no longer empty. They would contain paragraphs without text.
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
  #3  
Old 01-15-2021, 12:47 AM
macropod's Avatar
macropod macropod is offline How to put line numbers on existing blank pages? Windows 10 How to put line numbers on existing blank pages? Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 20,822
macropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant future
Default

Quote:
Originally Posted by gmayor View Post
If you fill the pages with paragraph breaks then the pages are no longer empty.
And/or line breaks... Either way the printed page will have only the line #s. Depending on the paragraph formatting, the line count will differ according to whatever mix of paragraph breaks and line breaks one uses.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #4  
Old 01-15-2021, 02:37 AM
tommydog tommydog is offline How to put line numbers on existing blank pages? Windows 7 64bit How to put line numbers on existing blank pages? Office 2016
Novice
How to put line numbers on existing blank pages?
 
Join Date: Jan 2021
Posts: 8
tommydog is on a distinguished road
Default

Quote:
Originally Posted by gmayor View Post
You can only have line numbers in a Word document in there are lines in the document to number. Your 'pages' merely contain section breaks. If you fill the pages with paragraph breaks then the pages are no longer empty. They would contain paragraphs without text.
Quote:
Originally Posted by macropod View Post
And/or line breaks... Either way the printed page will have only the line #s. Depending on the paragraph formatting, the line count will differ according to whatever mix of paragraph breaks and line breaks one uses.
Thanks for the replies.

How can I fill the blank pages with line breaks or paragraph breaks so they are no longer empty? I am looking for an automated way to do this, so wondered if there was some macro code that could do it? Or alternatively can this be done by something like find and replace?
Reply With Quote
  #5  
Old 01-15-2021, 02:42 AM
macropod's Avatar
macropod macropod is offline How to put line numbers on existing blank pages? Windows 10 How to put line numbers on existing blank pages? Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 20,822
macropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant future
Default

Perhaps you might start by telling us what you're trying to achieve...
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #6  
Old 01-15-2021, 03:07 AM
tommydog tommydog is offline How to put line numbers on existing blank pages? Windows 7 64bit How to put line numbers on existing blank pages? Office 2016
Novice
How to put line numbers on existing blank pages?
 
Join Date: Jan 2021
Posts: 8
tommydog is on a distinguished road
Default

Quote:
Originally Posted by macropod View Post
Perhaps you might start by telling us what you're trying to achieve...
The reason I want to do this is because the blank pages reflect the exact layout of PDF documents (sequence, orientation, page size) that I have (I don't have the source for these original PDF). If I can put line numbers on these pages and export to PDF, it's just a simple matter of overlaying these numbered pages onto my final documents. You may say, why not use a PDF editor to do this - well it would be very slow for thousands of pages. Neither do I want to use OCR, as this is also very time consuming and can change formatting.

If I can just find a way to fill the blank pages with line breaks or paragraph breaks so they are no longer empty, then this would achieve everything I want. Maybe there is a way through find and replace? Or maybe a simple macro would do it?
Reply With Quote
  #7  
Old 01-15-2021, 11:20 AM
kilroyscarnival kilroyscarnival is offline How to put line numbers on existing blank pages? Windows 10 How to put line numbers on existing blank pages? Office 2019
Advanced Beginner
 
Join Date: May 2019
Posts: 30
kilroyscarnival is on a distinguished road
Default

Quote:
Originally Posted by tommydog View Post
The reason I want to do this is because the blank pages reflect the exact layout of PDF documents (sequence, orientation, page size) that I have (I don't have the source for these original PDF). If I can put line numbers on these pages and export to PDF, it's just a simple matter of overlaying these numbered pages onto my final documents. You may say, why not use a PDF editor to do this - well it would be very slow for thousands of pages. Neither do I want to use OCR, as this is also very time consuming and can change formatting.
I think I understand your project. Is the text, and thus the numbering, continuous, or do you have to make the first section, say, 200 lines, and then a page break and another of 300, etc.?

You can use a simple repeating macro to repeat whichever you use, a paragraph break or a line break (note, though, check your paragraph spacing as to whether you need any additional spacing between paragraphs.

Allen Wyatt's Word Tips at tips.net has this as a suggested repeating code. As he mentions, your work will be made easier if you assign it to an easy keyboard shortcut so you can do it over and over again.

Repeating Actions (Microsoft Word)

I checked the FAQ, I hope it's okay to post a link to another site as I didn't see it was prohibited. This was one of the simpler solutions and clearly explained, and it allows you to do the repeat for all lines at once, or if you have to split them up you can employ it and vary the number for a different section.

Are you assured your numbers will align with your PDF? That seems a tricky consideration.

Best,

Ann
Reply With Quote
  #8  
Old 01-15-2021, 01:52 PM
macropod's Avatar
macropod macropod is offline How to put line numbers on existing blank pages? Windows 10 How to put line numbers on existing blank pages? Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 20,822
macropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant future
Default

Quote:
Originally Posted by tommydog View Post
The reason I want to do this is because the blank pages reflect the exact layout of PDF documents (sequence, orientation, page size) that I have (I don't have the source for these original PDF).
...
Or maybe a simple macro would do it?
There are two fundamental problems with trying to generate an exact replica of the PDF content in Word:
1. One would need to know the exact line-spacing used for all the lines in the PDF, not just the 'blank' ones; and
2. Word optimises the page layout for the currently-active printer, which can result in pagination changes just by changing printer drivers. In other words, some content, including numbers for 'blank' lines could end up on different pages.

A macro could be written, but it wouldn't be simple.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #9  
Old 01-15-2021, 05:11 PM
tommydog tommydog is offline How to put line numbers on existing blank pages? Windows 7 64bit How to put line numbers on existing blank pages? Office 2016
Novice
How to put line numbers on existing blank pages?
 
Join Date: Jan 2021
Posts: 8
tommydog is on a distinguished road
Default

Quote:
Originally Posted by macropod View Post
There are two fundamental problems with trying to generate an exact replica of the PDF content in Word:
1. One would need to know the exact line-spacing used for all the lines in the PDF, not just the 'blank' ones; and
2. Word optimises the page layout for the currently-active printer, which can result in pagination changes just by changing printer drivers. In other words, some content, including numbers for 'blank' lines could end up on different pages.

A macro could be written, but it wouldn't be simple.
These are not problems, as the object of line numbering is not to place numbers exactly inline with the text, but as a rough reference.
Reply With Quote
  #10  
Old 01-15-2021, 06:45 PM
Charles Kenyon Charles Kenyon is offline How to put line numbers on existing blank pages? Windows 10 How to put line numbers on existing blank pages? Office 2019
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 7,155
Charles Kenyon is a splendid one to beholdCharles Kenyon is a splendid one to beholdCharles Kenyon is a splendid one to beholdCharles Kenyon is a splendid one to beholdCharles Kenyon is a splendid one to beholdCharles Kenyon is a splendid one to beholdCharles Kenyon is a splendid one to beholdCharles Kenyon is a splendid one to behold
Default

You can create two text boxes in your header in the right and left margin. Remove any border and put your line numbers in the text box. Align them. They should be set to be behind text.
Reply With Quote
  #11  
Old 01-15-2021, 06:49 PM
macropod's Avatar
macropod macropod is offline How to put line numbers on existing blank pages? Windows 10 How to put line numbers on existing blank pages? Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 20,822
macropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant future
Default

Quote:
Originally Posted by tommydog View Post
These are not problems, as the object of line numbering is not to place numbers exactly inline with the text, but as a rough reference.
So it's not a problem if the number for the last blank line on a page to become a blank line at the top of the next page of text - or vice-versa???
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to put line numbers on existing blank pages? Adding a decimal point in an already existing column of numbers wheddingsjr Excel 3 07-26-2019 07:41 AM
How to put line numbers on existing blank pages? get rid of line above page numbers at bottom of pages. Joanrichmond Word 1 02-11-2014 12:57 PM
Added page numbers and now printing unwanted blank pages. galvax Word 2 12-18-2013 08:41 PM
How to put line numbers on existing blank pages? Deleting blank pages Microsoftenquirer1000 Word 14 08-27-2012 01:24 PM
hidden blank pages mljm Word 3 06-19-2009 03:18 AM

Other Forums: Access Forums - Senior Forums

All times are GMT -7. The time now is 07:16 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2021 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft