Re: macro to take out spaces

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Suzanne S. Barnhill (sbarnhill_at_mvps.org)
Date: 10/25/04


Date: Mon, 25 Oct 2004 09:56:06 -0500

Occasionally there appear strange characters (especially in text pasted from
the Web) that are displayed as paragraph breaks but are actually line
breaks. If ^l (that's a lowercase L) doesn't find them, then you can try
^13, which will sometimes find one of these anomalies.

-- 
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
"boris" <anonymous@discussions.microsoft.com> wrote in message
news:0c3b01c4ba9b$d2a8c6b0$a601280a@phx.gbl...
> Suzanne, thanks again, so other than tables, there
> shouldn't be any reason that the double paragraph mark
> would not be found?  Odd, as this document is just one
> long series of lines, which now read text, carriage,
> carriage, text, etc.  Cannot figure it out for the life
> of me.
>
> If you can think of anything else, let me know.  Would it
> be possible for me to email the doc offline (at least a
> portion of it) to see if you notice anything?  I keep my
> machine updated with anti-virus every day, so there
> should not be a threat.
>
> Boris
> >-----Original Message-----
> >If you expand the Find and Replace dialog (click More)
> and click on Special,
> >you will find a list of such characters. The list is
> different for "Find
> >what" and "Replace with," and both change if you enable
> wildcards. For a
> >complete list, see "WD97: Control Codes to Use with Find
> and Replace (Edit
> >Menu)" at http://support.microsoft.com/?kbid=197855
> >
> >It has been discovered that for some reason a Replace
> operation won't remove
> >an empty paragraph before a table. This is inconvenient,
> but there is
> >apparently no workaround (not even through VBA IIRC).
> >
> >-- 
> >Suzanne S. Barnhill
> >Microsoft MVP (Word)
> >Words into Type
> >Fairhope, Alabama USA
> >Word MVP FAQ site: http://word.mvps.org
> >Email cannot be acknowledged; please post all follow-ups
> to the newsgroup so
> >all may benefit.
> >
> >"boris" <anonymous@discussions.microsoft.com> wrote in
> message
> >news:00e901c4ba48$15211dc0$a401280a@phx.gbl...
> >> no sooner do I say it's exactly what I needed, than I
> come
> >> up with another problem...first of all, is there some
> >> place that lists all the combinations like ^p which
> >> represent non-alphanumeric characters?  second, for
> some
> >> reason, when I first searched for ^p^p and replaced
> with
> >> ^p, it found several matches.  However there are still
> >> some that appear to be there (I have the paragraph
> marks
> >> on), and yet it won't find those when I run the search
> >> again.  Any idea why this might be?  Thx for the
> continued
> >> help.
> >>
> >> Boris
> >> >-----Original Message-----
> >> >Of course. Search for <space>^p and replace with ^p.
> If I
> >> were doing this, I
> >> >would then search for ^p^p and replace with ^p.
> >> >
> >> >-- 
> >> >Suzanne S. Barnhill
> >> >Microsoft MVP (Word)
> >> >Words into Type
> >> >Fairhope, Alabama USA
> >> >Word MVP FAQ site: http://word.mvps.org
> >> >Email cannot be acknowledged; please post all follow-
> ups
> >> to the newsgroup so
> >> >all may benefit.
> >> >
> >> >"boris" <anonymous@discussions.microsoft.com> wrote in
> >> message
> >> >news:00d501c4ba3c$f330c400$a401280a@phx.gbl...
> >> >> Jezebel, thanks very much.  I did multiple searches
> for
> >> >> double spaces and replaced with single.  I still
> have
> >> the
> >> >> following problem.  I have:
> >> >>
> >> >> 1) lines ending in carriage return, with the
> following
> >> >> lines being just carriage returns
> >> >> 2) line ending in carriage return, with the
> following
> >> >> lines being space followed by carriage returns
> >> >> 3) after taking out all double spaces that were
> leading
> >> >> each line, I now still have one space at the
> beginning
> >> of
> >> >> those lines, but cannot search for simply single
> spaces,
> >> >> since this would take every space.  Is there a way
> to
> >> find
> >> >> carriage return followed by space, and replace it
> with
> >> >> just carriage return?
> >> >>
> >> >> I think what I need is to know how to represent a
> >> carriage
> >> >> return in the find/replace dialogue.  Then I can
> come up
> >> >> with the combinations I need to find them.  If you
> >> happen
> >> >> to know what tab is, that would help also.
> >> >>
> >> >> Thanks much.
> >> >>
> >> >> boris
> >
> >.
> >


Relevant Pages

  • Re: macro to take out spaces
    ... you will find a list of such characters. ... please post all follow-ups to the newsgroup so ... >>> 1) lines ending in carriage return, ...
    (microsoft.public.word.docmanagement)
  • Re: Including carriage returns AND line breaks in a .txt document
    ... then you can preserve both line end and paragraph ... characters. ... > tab-delimited document. ... Records are separated by a carriage ...
    (microsoft.public.mac.office.word)
  • Re: writing a return to a file
    ... Are you talking about Ascii code 13 (carriage return) or a logical line ... Tcl can convert carriage return on input into a line separator ...
    (comp.lang.tcl)
  • Re: Decatenate a field with Make Table Query?
    ... You can probably do something similar in MS Word, lining them up using tab characters in ordinary paragraphs. ... You can use Word to delete lines that contain only white space, and you can delete repeated paragraph marks. ... I would define a special paragraph style that would include the tab settings for this operation, but would not save it in the global Word template, as you'll likely never need this style again, so leave "Add to Template" unchecked, but check "Automatically Update". ... In the Excel cell the paragraph marks show up as bangs; ...
    (microsoft.public.access.queries)
  • Re: Mad Men "Three Sundays" (S2XE4) spoilers
    ... Within a paragraph, each ... it's not less than 80 characters, probably done at your News server. ... sex for business purposes, in the grand tradition of an agent, heh. ... And since when was Bobbie engaging in a legitimate ...
    (rec.arts.tv)