![]() |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
![]()
Hi All,
I have text copied from various sources in different word files which I want to format in a particular style so as to match a given layout. Basically the text needs to be broken down into new lines/paragraphs at specific places which is given in the instructions. Instead of having to press 'Enter' and then remove/delete spaces at every line, I wish to do that with just one click per line using macro. These files could be 500+ in number, so modifying all in one go using Macros is the preferred way.(Although I find it impossible when the point of insertion of 'Enter' can only be done manually on each file.) I have used Macros to achieve 90% of that however need one last step where a Macro can do the following: 1. Where ever the user clicks on the page, all space(regular, non-breaking space, white-space) until the next printed character is deleted. 2. An 'Enter' or Carriage-Return is inserted, so that the text moves to the next line. Steps 1 and 2 are repeated at every click the user makes on the text. [Example Text] offer unto the LORD, have I given thee, and thy sons and thy daughters with thee, by a statute for ever: it is a covenant of salt for ever before the LORD unto thee and to thy seed with thee. 18:20 And the LORD spake unto Aaron, Thou shalt have no inheritance in their land, neither shalt thou have any part among them: I am thy part and thine inheritance among [Expected Text] offer unto the LORD, have I given thee, and thy sons and thy daughters with thee, by a statute for ever: it is a covenant of salt for ever before the LORD unto thee and to thy seed with thee. 18:20 And the LORD spake unto Aaron, Thou shalt have no inheritance in their land, neither shalt thou have any part among them: I am thy part and thine inheritance among Notice that as 'Enter' is pressed at the end of these lines although they come in next line but usually a space character is there in front of those lines(appears in MS Word but not here in the forum's text window), which I wanted to remove automatically at one go. Another approach is to click, delete the required spaces until the next character and then hit enter. Something like Find ^w and Replace with ^p running at every place a user clicks, but with Macros. Any help is appreciated. Thanks, David Lover |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
Lawmuse | Word VBA | 9 | 02-27-2023 06:36 AM |
![]() |
LearnerExcel | Excel Programming | 8 | 02-04-2018 08:22 PM |
![]() |
marceepoo | Word VBA | 2 | 12-30-2016 09:04 PM |
Get rid of leading spaces before paragraphs | fig000 | Word | 11 | 03-14-2016 01:59 PM |
![]() |
Dave T | Word VBA | 2 | 07-16-2015 11:23 PM |