Format changes after a sentence was pasted

  • Thread starter Struggling Kiwi
  • Start date
S

Struggling Kiwi

I have copied a sentence from a PDF document and pasted it into a word 2007
document. The text has a space between each letter and three spaces between
each word. Can I alter this to no spaces between letters then manually space
each word??? I also read that the text type has altered in other questions
which also happened. I purchased a Visagesoft PDF Editor from the UK.

Any assistance very much appreciated from confused in New Zealand.
 
M

Ms-Exl-Learner

Try this…

Instead of making the words without space and giving space manually, you can
do it in a single way. Just press CNTRL+H and in Find What Box give three
spaces and in Replace With Box give one space, then press Replace All button.
This will replace all three spaces with single space.

If this post helps, Click Yes!
 
G

Graham Mayor

You need three passes - try the following macro

With ActiveDocument.Range
.Text = Replace(ActiveDocument.Range.Text, " ", "@@@")
.Text = Replace(ActiveDocument.Range.Text, " ", "")
.Text = Replace(ActiveDocument.Range.Text, "@@@", " ")
End With

http://www.gmayor.com/installing_macro.htm
--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
G

Graham Mayor

Or even

With ActiveDocument.Range
.Text = Replace(.Text, " ", "@@@")
.Text = Replace(.Text, " ", "")
.Text = Replace(.Text, "@@@", " ")
End With


--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

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