#1
|
|||
|
|||
Replace last fullstop/period at end of each page
Good day, Could someone please assist me with a macro to find the last fullstop/period at the end of each page (±500 pages) and replace that fullstop/period with a carriage return in order for the next sentence to start on the following page. I foresee that such a macro might have to be run more than once as, e.g. page 1's "overflow" sentence will move to page 2, and thus possibly changing the position of page 2's last fullstop/period and so forth. Any help will be greatly appreciated. |
#2
|
|||
|
|||
Hi,
You can't work with pages, you have to work with paragraphs. You need to loop paragraphs and return the page number - https://www.msofficeforums.com/word-...ph-number.html Paragraphs overlapping over two pages will be problematic so ensure that all paragraphs are set to "Keep lines together". To get last paragraph, just check when page number changes then add full stop at previous paragraph. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Macro Needed to Replace a Period by a Comma | rsrasc | Word VBA | 2 | 08-23-2015 03:23 PM |
Count the common time period (month) between two date period of time | Barni | Excel | 6 | 08-15-2014 07:52 AM |
replace page 2 with another document | Rockitman31 | Word | 4 | 08-16-2013 06:01 PM |
Find and replace page numbers in body of text | tollanarama | Word | 3 | 02-13-2011 06:00 AM |
replace automatically generated page numbers | LitWissOnline | Word | 3 | 01-24-2011 03:40 PM |