Using Regular expressions in Replace

E

excel_hari

Hi,

Is it possible to use regular expressions to do a find/replace in Word
document.

I copied some data from an application in to word like this:-

asd
qwe
zxc
vbn
ghj
yui


I wanted to transpose it to a single row with a space (by doing a
replace on \n )
asd qwe zxc vbn ghj yui

(I could usually do such stuff with Textpad and want to know how to do
in Winword)

Regards,
HP
India
 
D

Doug Robbins - Word MVP

Using Edit>Replace, enter either ^p or ^l in the Find what control and put a
space in the Replace with control.

Whether you need the ^p or ^l will depend on whether each item is in a
separate paragraph, in which case the line will terminate with a ¶ when you
click on the Show/Hide button on the toolbar (the one with the ¶ icon). For
that case, you would use ^p. If each line does not terminate in a ¶, use ^l

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top