Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Closed Thread
 
Thread Tools Display Modes
  #1  
Old 06-14-2011, 10:07 PM
macropod's Avatar
macropod macropod is offline Get rid of leading spaces before paragraphs Windows 7 32bit Get rid of leading spaces before paragraphs Office 2007
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi Fig,

Try a wildcard Find/Replace, where:
Find =^13[ ]{1,}
Replace = ^p

An alternative is:


Find = [ ]{1,}([!^13]@^13)
Replace = \1

The first one replaces the spaces following a paragraph break - which is effectively the same as replacing spaces before a paragraph's text - except for the first paragraph in a Section or table cell. The second one replaces the spaces at the start of a paragraph, except for the last paragraph in a table cell. There is no Find/Replace formulation that will locate solitary 'paragraphs' within a table cell.

Your publisher probably also won't want multiple paragraph breaks (ie lines created by hitting the Enter key) between your 'real' paragraphs. You can clean those out with another wildcard Find/Replace, where:
Find = [^13]{1,}
Replace = ^p

Likewise, multiple spaces after periods, etc, for which you can use yet another wildcard Find/Replace, where:
Find = ( )[ ]{1,}
Replace = \1

Note: The correct way to apply the indented formatting you obtained via the spacebar is via first line indenting for the paragraph (eg Format|Paragraph), preferably by defining an appropriate paragraph Style and applying that to the paragraphs of interest. This is most likely what your publisher will do - along with specifying an appropriate before/after space setting for each paragraph.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
  #2  
Old 06-19-2011, 08:27 PM
fig000 fig000 is offline Get rid of leading spaces before paragraphs Windows Vista Get rid of leading spaces before paragraphs Office 2007
Novice
Get rid of leading spaces before paragraphs
 
Join Date: Jun 2011
Posts: 6
fig000 is on a distinguished road
Default

Macropod,

Thanks for responding. I'll admit these find/replace things are new to me. I will research it.

However I wanted to run something by you. I wrote a small .net program that brought in parts of the word doc one character at a time. I found a paragraph by looking at the doc in word and found that at the beginning of paragraph there were two leading "spaces" (I'm not sure what the characters were-I wanted to find the ascii codes of these two characters thinking that there might be some garbage or some Word formatting characters)

The odd thing is that I found the last few charactesrs of the previous paragraph then an ascii 13 (a carriage return). At the beginning of the new paragraph with the two spaces, I could only see the first visible letter in the document that was in the paragraph's. In other words the two "spaces" weren't in the file.

As a test I went into a copy of the word doc. I was able to get rid of the "spaces" by backspacing over them.

If there is something I don't know, such as the fact that some of the formatting characters are not directly in line with the text, please tell me. I could go through this by hand but I'd rather not.

Any help would be appreciated.

Thanks,
Fig000
Closed Thread



Similar Threads
Thread Thread Starter Forum Replies Last Post
Get rid of leading spaces before paragraphs HELP - problem with disappearing spaces klanch Word 3 02-11-2011 10:32 AM
changing font size without changing leading carolns Word 1 09-14-2009 12:30 PM
Get rid of leading spaces before paragraphs Eliminate blanc spaces at the beginnig row Il_Fabietto Word VBA 9 06-26-2009 05:04 AM
Spaces After Each Word jnutella Word 0 03-04-2009 02:00 PM
Word to Excel hyperlinks and spaces gak Word 1 09-14-2008 08:38 AM

Other Forums: Access Forums

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


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