[comp.sys.mac.apps] Another MS-Word QUestion.....

a544@mindlink.UUCP (Rick McCormack) (01/24/91)

Nuno M. Paixao, <paixao@ug.cs.dal.ca> writes:

Is there anyway to make MS-WORD
strip out all the carriage return at the end of each line, and replace them
witha space. I would need to do this, so that for one th
ing, I could justify my
documents. There are other reasons, but that would be the main one.


Nuno, I use MS Word 4, but to do the little job you asked about, I use McSink,
a DA that seems to be a 'netters dream.  Then I use Word to do the final
formatting and printing, although McSink could do most of what I want.  I have
a few glossary items and standard footers etc, that Word handlse easily for me.
I have done some of what you want in Word:  (1) change all ^p^p (double
returns) to )*(
(2) change all ^p  (single returns) to [space]
(3) change )*( to ^p^p (double returns)

The troubles begin when you find that there are some of:
^p[space][space]^p  which will become [space][space][space][space]
Not at all what you intended.  Generally, McSink is much more graceful handling
these formatting problems.  I recommend it.
--
______________________________________________________________| Rick McCormack |  IMAGISTICS BUSINESS THEATRE TECHNOLOGY    || Vancouver,  BC |  Information transfer - with a purpose.    ||     CANADA     |  ________________________________________  ||  AOL:  Rique   |  INTERACTIVE  COMPREHENSIVE  ENLIGHTENING  ||________________|____________________________________________|.

paixao@ug.cs.dal.ca (Nuno M. Paixao) (01/24/91)

I have another question about MS-WORD.

I find myself dowdloading ASCII files from here, USENET NEWS, and sometimes, I would like to bring them into my word processor. Is there anyway to make MS-WORD
strip out all the carriage return at the end of each line, and replace them witha space. I would need to do this, so that for one thing, I could justify my 
documents. There are other reasons, but that would be the main one.

Any suggestios?


Nuno


-- 
Nuno M. Paixao    \\ PAIXAO@UG.CS.DAL.CA  \\  So I don't have an exciting
2319 Clifton St.  \\ DEXTER@AC.DAL.CA     \\  .SIGNATURE file.... If you 
Halifax, NS, CAN. \\ DEXTER@DALAC.BITNET  \\  hate it that much, why don't
(902) 492-9402    \\                      \\  you design a better one for me.

xdab@ellis.uchicago.edu (David Baird) (01/25/91)

In article <1991Jan24.153219.29086@cs.dal.ca> paixao@ug.cs.dal.ca (Nuno M. Paixao) writes:
>I have another question about MS-WORD.
>
>I find myself dowdloading ASCII files from here, USENET NEWS, and sometimes, I would like to bring them into my word processor. Is there anyway to make MS-WORD
>strip out all the carriage return at the end of each line, and replace them witha space. I would need to do this, so that for one thing, I could justify my 
>documents. There are other reasons, but that would be the main one.

In the Change dialog box, you can find CRs by entering ^p and
replacing with a space. Hit change all and the work is finished. This will
of course also remove all the CRs that are separating paragraphs.
>
>Any suggestios?
>
>
>Nuno
>
>
>-- 
>Nuno M. Paixao    \\ PAIXAO@UG.CS.DAL.CA  \\  So I don't have an exciting
>2319 Clifton St.  \\ DEXTER@AC.DAL.CA     \\  .SIGNATURE file.... If you 
>Halifax, NS, CAN. \\ DEXTER@DALAC.BITNET  \\  hate it that much, why don't
>(902) 492-9402    \\                      \\  you design a better one for me.


--
X-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-X
X	           David Baird			xdab@midway.uchicago.edu      X
X	      University of Chicago		  d-baird@uchicago.edu        X
X	University Computing Organizations	     (312) 702-7161           X

dwal@ellis.uchicago.edu (David Walton) (01/25/91)

[Nuno M. Paixao asks if there's a way to make Word strip the carriage returns
at the ends of lines]

In article <1991Jan24.173516.22098@midway.uchicago.edu> xdab@ellis.uchicago.edu (David Baird) replies:

>In the Change dialog box, you can find CRs by entering ^p and
>replacing with a space. Hit change all and the work is finished. This will
								  ^^^^^^^^^
>of course also remove all the CRs that are separating paragraphs.
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

If you have blank lines between your paragraphs, you can avoid this
problem by remembering that at the end of a paragraph, you'll have two
carriage returns right together (one at the end of the last line in a
paragraph, one at the end of the blank line which separates the
current paragraph from the next one).  If you use the Replace All
facility to replace each CR with something like 'XXXX', you'll get an
'XXXX' at each former end of line within the paragraph, and 'XXXXXXXX'
at the end of the paragraph.  Just use Replace All to replace the
single CRs 'XXXX' with spaces and the double CRs 'XXXXXXXX' with
carriage returns, and you've got it.

>X	           David Baird			xdab@midway.uchicago.edu      X



--
David Walton            Internet: dwal@midway.uchicago.edu
University of Chicago   {  Any opinions found herein are mine, not  }
Computing Organizations {  those of my employers (or anybody else). }

clarson@ux.acs.umn.edu (Chaz Larson) (01/25/91)

In article <1991Jan24.153219.29086@cs.dal.ca> paixao@ug.cs.dal.ca (Nuno M. Paixao) writes:
|I have another question about MS-WORD.
|
|I find myself dowdloading ASCII files from here, USENET NEWS, and sometimes,
| I would like to bring them into my word processor. Is there anyway to make
| MS-WORD
|strip out all the carriage return at the end of each line, and replace them
| witha space. I would need to do this, so that for one thing, I could justify
| my 

Well, here's how I do it.

Imagine that this is our downloaded file, and that "@" is a carriage return
marker as it would show up in Word.

I have another question about MS-WORD.@
@
I find myself dowdloading ASCII files from here,@
USENET NEWS, and sometimes, I would like to bring@
them into my word processor. Is there anyway to make@
MS-WORD strip out all the carriage return at the end@
of each line, and replace them witha space.@
@
Any suggestions?@
@

OK, notice that there are two "@" between each paragraph and just one at the
end of each line.

Using the "change" command, change all occurences of two carriage returns in a
row to something that will never occur naturally in the document, like ")(*&".

In WordSpeak, you would change all ^p^p to )(*&  .

Now, change all single carriage returns to spaces:

Again, in WordSpeak: change all ^p to  .

Finally, change all ")(*&" to carriage returns.

change all )(*& to ^p   .

Of course, if you want to keep the headers intact, you'll have to add a few 
more returns in there, as the above method will treat the USENET article header
as one paragraph and strip all the returns out of it.

Alternatively, you could select the first paragraph, change all ^p to space, 
and repeat this for each paragraph in the document, bypassing the )(*& nonsense
entirely.  This will take longer, however.

chaz


-- 
Someone please release me from this trance.
clarson@ux.acs.umn.edu                                       AOL:Crowbone

clouds@ccwf.cc.utexas.edu (Kathy Strong) (01/25/91)

In article <3113@ux.acs.umn.edu> clarson@ux.acs.umn.edu (Chaz Larson) writes:
>In article <1991Jan24.153219.29086@cs.dal.ca> paixao@ug.cs.dal.ca (Nuno M. Paixao) writes:
>|I have another question about MS-WORD.
>|
>|I find myself dowdloading ASCII files from here, USENET NEWS, and sometimes,
>| I would like to bring them into my word processor. Is there anyway to make
>| MS-WORD
>|strip out all the carriage return at the end of each line, and replace them
>| witha space. I would need to do this, so that for one thing, I could justify
>| my 
>
>[Chaz explains how to replace double-returns with some unused string,
  replace all returns with spaces, and replace the string with double
  returns...]

Or, you could get Add/Strip 2.9, a shareware utility that processes text
files in a number of ways, including adding or stripping CRs and LFs,
changes ellipses, em-dashes, user-specified strings, forcing lines to
a certain length, etc. etc.  I use it nearly every day for downloads
and uploads to/from Macs, DOS machines, and UNIX boxes. It's available
via anonymous ftp at one of the larger sites (sorry, I don't remember
which... try sumex first), or if you can't find it anywhere, drop a line
and I'll mail it.  I LOVE IT!

--K

-- 
...........................................................................
:   Kathy Strong               :  "Try our Hubble-Rita: just one shot,     :
:  (Clouds moving slowly)      :   and everything's blurry"                :
:   clouds@ccwf.cc.utexas.edu  :                           --El Arroyo     :
:..........................................................................:

dana@are.berkeley.edu (Dana E. Keil) (01/25/91)

The question is about stripping line feeds, forming paragraphs from
stuff transferred to Mac from somewhere else. I like Vantage a lot
for doing this sort of text handling (McSink is the non-commercial
version of Vantage, but I'd recommend buying Vantage since it does
some things that McSink doesn't).
--
Dana E. Keil                Department of Agricultural and Resource Economics
University of California, Berkeley                      dana@are.berkeley.edu

patrinos@rodan.acs.syr.edu (Anthony J. Patrinos) (01/25/91)

Doesn't Apple File Exchange have an opiton to translate between to Mac
Text files and do just that, i.e. change CR/LF to CR and vica versa?

Tony Patrinos