VBA or function for WORD to find and delete extra spaces and linebreaks
VBA or function for WORD to find and delete extra spaces and linebreaks
(OP)
I have the titles of papers/books/references in my digital library that I need to amend into a simple filename-type format in UPPERCASE but without the linebreaks and extra spaces, using WORD, for example:
"Repairing unbonded {linebreak}
post-tensioned {extra space} concrete"
Becomes:
"REPAIRING UNBONDED POST-TENSIONED CONCRETE"
I can amend the text to UPPERCASE simply enough using a WORD command, but is there any way to automate the deletion of linebreaks and extras spaces between words, via a WORD function or some simple VBA code?
I have to repeat this task many, many times.
Thank you.
"Repairing unbonded {linebreak}
post-tensioned {extra space} concrete"
Becomes:
"REPAIRING UNBONDED POST-TENSIONED CONCRETE"
I can amend the text to UPPERCASE simply enough using a WORD command, but is there any way to automate the deletion of linebreaks and extras spaces between words, via a WORD function or some simple VBA code?
I have to repeat this task many, many times.
Thank you.





RE: VBA or function for WORD to find and delete extra spaces and linebreaks
Replace linebreak with space.
Replace space space with space.
RE: VBA or function for WORD to find and delete extra spaces and linebreaks
I did not release that Find and Replace works with linebreaks and spaces. It does indeed.
Thanks, again.
RE: VBA or function for WORD to find and delete extra spaces and linebreaks
One thing that's really annoying about copying a title from a PDF is the embedded returns, but it turns out that there are a number of programs, like Chrome, where if you paste this kind of title into the URL box, the returns will disappear, so copy | paste to Chrome | <CTRL>+A | copy gets rid of the extra returns.
TTFN

FAQ731-376: Eng-Tips.com Forum Policies
Need help writing a question or understanding a reply? forum1529: Translation Assistance for Engineers
Of course I can. I can do anything. I can do absolutely anything. I'm an expert!
RE: VBA or function for WORD to find and delete extra spaces and linebreaks
Thanks.
RE: VBA or function for WORD to find and delete extra spaces and linebreaks
24 MPixel 36 x 24 mm2 14 bit image sensor in 110/90 nm CMOS technology
This is what I get after pasting the same thing in Chrome's URL box:
24 MPixel 36 x 24 mm2 14 bit image sensor in 110/90 nm CMOS technology
TTFN

FAQ731-376: Eng-Tips.com Forum Policies
Need help writing a question or understanding a reply? forum1529: Translation Assistance for Engineers
Of course I can. I can do anything. I can do absolutely anything. I'm an expert!