Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 02-18-2023, 01:04 PM
Meraai Meraai is offline Replace last fullstop/period at end of each page Windows 10 Replace last fullstop/period at end of each page Office 2019
Novice
Replace last fullstop/period at end of each page
 
Join Date: Feb 2023
Location: Philippolis, South Africa
Posts: 1
Meraai is on a distinguished road
Post 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.
Reply With Quote
  #2  
Old 02-18-2023, 11:48 PM
TheBigBoss TheBigBoss is offline Replace last fullstop/period at end of each page Windows 10 Replace last fullstop/period at end of each page Office 2016
Advanced Beginner
 
Join Date: Dec 2016
Posts: 56
TheBigBoss is on a distinguished road
Default

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.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Replace last fullstop/period at end of each page 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 last fullstop/period at end of each page 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 last fullstop/period at end of each page replace automatically generated page numbers LitWissOnline Word 3 01-24-2011 03:40 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:59 AM.


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