Text formatting in Word
Moderators: Bakhtosh, EvilHomer3k
- Bakhtosh
- Forum Moderator
- Posts: 10900
- Joined: Wed Oct 13, 2004 12:24 pm
- Location: The First Avenger
- Contact:
Text formatting in Word
I want to highlight a section of text and remove all of the CRs.
Example before:
The original text is
like this. It is all
broken up and doesn't
fill up the entire width
of the line.
Example after:
The original text is like this. It is all broken up and doesn't fill up the entire width of the line.
I don't want to do it to the whole document, just a highlighted paragraph. Any clues?
Example before:
The original text is
like this. It is all
broken up and doesn't
fill up the entire width
of the line.
Example after:
The original text is like this. It is all broken up and doesn't fill up the entire width of the line.
I don't want to do it to the whole document, just a highlighted paragraph. Any clues?
“I prefer dangerous freedom over peaceful slavery.” -Thomas Jefferson
Finding Red Riding Hood well-armed, the wolf calls for more gun control.
Finding Red Riding Hood well-armed, the wolf calls for more gun control.
- LawBeefaroni
- Forum Moderator
- Posts: 56570
- Joined: Fri Oct 15, 2004 3:08 pm
- Location: Urbs in Horto, bonded and licensed.
Find and replace. There's an option for special characters.
I think you want Paragraph Mark.
Edit: Or manual line break.
I think you want Paragraph Mark.
Edit: Or manual line break.
" Hey OP, listen to my advice alright." -Tha General
"“I like taking the guns early...to go to court would have taken a long time. So you could do exactly what you’re saying, but take the guns first, go through due process second.” -President Donald Trump.
"...To guard, protect, and maintain his liberty, the freedman should have the ballot; that the liberties of the American people were dependent upon the Ballot-box, the Jury-box, and the Cartridge-box, that without these no class of people could live and flourish in this country." - Frederick Douglass
MYT
"“I like taking the guns early...to go to court would have taken a long time. So you could do exactly what you’re saying, but take the guns first, go through due process second.” -President Donald Trump.
"...To guard, protect, and maintain his liberty, the freedman should have the ballot; that the liberties of the American people were dependent upon the Ballot-box, the Jury-box, and the Cartridge-box, that without these no class of people could live and flourish in this country." - Frederick Douglass
MYT
- Bakhtosh
- Forum Moderator
- Posts: 10900
- Joined: Wed Oct 13, 2004 12:24 pm
- Location: The First Avenger
- Contact:
of course, as soon as I ask I find it.
For those who want to know, highlight the section you want to work in.
Go to the find/replace window (Ctrl-F or Edit, Replace). If you don't see the button, "Special", click on "More" then click on "Special". Choose the paragraph mark and replace it with nothing. Then click on replace all and say no when it asks if you want to do the whole document.
For those who want to know, highlight the section you want to work in.
Go to the find/replace window (Ctrl-F or Edit, Replace). If you don't see the button, "Special", click on "More" then click on "Special". Choose the paragraph mark and replace it with nothing. Then click on replace all and say no when it asks if you want to do the whole document.
“I prefer dangerous freedom over peaceful slavery.” -Thomas Jefferson
Finding Red Riding Hood well-armed, the wolf calls for more gun control.
Finding Red Riding Hood well-armed, the wolf calls for more gun control.
- Bakhtosh
- Forum Moderator
- Posts: 10900
- Joined: Wed Oct 13, 2004 12:24 pm
- Location: The First Avenger
- Contact:
Okay...this isn't working. Let's be more specific...
I have a plain text file that I want to print. The problem is that I want to print it, saving as much paper as possible. To do this, I typically reduce the font size and print it booklet style. When I open the document in Word, and show paragraph marks, there's one at the end of every line, which leaves a lot of white space at the end of the line once it's reduced.
I want to get rid of the marks except the ones behind a period or that are on a line by themselves.
In Word, I can search for ^$^p and that will find any paragraph mark that's preceded by any letter, but when I replace that with a space or nothing, it also deletes the last letter of the line...not good.
So I need some kind of conditional formatting command that can run a function.
if char == ^p [paragraph mark] and prev_char == ^$ [any letter] then char = ^s [space]
I have a plain text file that I want to print. The problem is that I want to print it, saving as much paper as possible. To do this, I typically reduce the font size and print it booklet style. When I open the document in Word, and show paragraph marks, there's one at the end of every line, which leaves a lot of white space at the end of the line once it's reduced.
I want to get rid of the marks except the ones behind a period or that are on a line by themselves.
In Word, I can search for ^$^p and that will find any paragraph mark that's preceded by any letter, but when I replace that with a space or nothing, it also deletes the last letter of the line...not good.
So I need some kind of conditional formatting command that can run a function.
if char == ^p [paragraph mark] and prev_char == ^$ [any letter] then char = ^s [space]
“I prefer dangerous freedom over peaceful slavery.” -Thomas Jefferson
Finding Red Riding Hood well-armed, the wolf calls for more gun control.
Finding Red Riding Hood well-armed, the wolf calls for more gun control.
- LawBeefaroni
- Forum Moderator
- Posts: 56570
- Joined: Fri Oct 15, 2004 3:08 pm
- Location: Urbs in Horto, bonded and licensed.
Did you try manual line break (^l)?
I think it works on end of line regardless of the last character in the line. You can try replacing it with nothing (replace with null) but you might get words that run together. I'd just replace it with a space. Worst case, you get words with two spaces between them.
You can then do a find/replace for double spaces I guess.
It should keep paragraphs separate as well as single lines.
I think it works on end of line regardless of the last character in the line. You can try replacing it with nothing (replace with null) but you might get words that run together. I'd just replace it with a space. Worst case, you get words with two spaces between them.
You can then do a find/replace for double spaces I guess.
It should keep paragraphs separate as well as single lines.
" Hey OP, listen to my advice alright." -Tha General
"“I like taking the guns early...to go to court would have taken a long time. So you could do exactly what you’re saying, but take the guns first, go through due process second.” -President Donald Trump.
"...To guard, protect, and maintain his liberty, the freedman should have the ballot; that the liberties of the American people were dependent upon the Ballot-box, the Jury-box, and the Cartridge-box, that without these no class of people could live and flourish in this country." - Frederick Douglass
MYT
"“I like taking the guns early...to go to court would have taken a long time. So you could do exactly what you’re saying, but take the guns first, go through due process second.” -President Donald Trump.
"...To guard, protect, and maintain his liberty, the freedman should have the ballot; that the liberties of the American people were dependent upon the Ballot-box, the Jury-box, and the Cartridge-box, that without these no class of people could live and flourish in this country." - Frederick Douglass
MYT
- Freezer-TPF-
- Posts: 12698
- Joined: Wed Oct 13, 2004 2:41 pm
- Location: VA
- Grundbegriff
- Posts: 22277
- Joined: Wed Oct 13, 2004 3:46 am
- Location: http://baroquepotion.com
- Contact:
Here's what I do to preserve the ^p's that separate paragraphs while eliminating the ones that force a line feed:Bakhtosh wrote:I want to get rid of the marks except the ones behind a period or that are on a line by themselves.
First, search for ^p^p and replace it with @@@ (or some other memorable string that doesn't occur in the text itself).
Second, search for ^p and replace it with a single space.
Third, search for @@@ and replace it with ^p^p. That'll put your paragraph structure back in place.
- Bakhtosh
- Forum Moderator
- Posts: 10900
- Joined: Wed Oct 13, 2004 12:24 pm
- Location: The First Avenger
- Contact:
I actually did something like that last night after brainstorming about it at dinner. My method was more complex, so I like yours a lot better.
If I had any experience at VBA scripting, I'd be on this like white on rice, but I've never actually written anything in VBA (despite taking the CBT course in it a few years ago).
Thanks for the critical thinking guys.
If I had any experience at VBA scripting, I'd be on this like white on rice, but I've never actually written anything in VBA (despite taking the CBT course in it a few years ago).
Thanks for the critical thinking guys.
“I prefer dangerous freedom over peaceful slavery.” -Thomas Jefferson
Finding Red Riding Hood well-armed, the wolf calls for more gun control.
Finding Red Riding Hood well-armed, the wolf calls for more gun control.