![]() |
|
#1
|
|||
|
|||
![]()
I am trying to format a book that I can put on my amazon kindle, but im having some formatting problems. The only real way to explain this problem is by seeing a picture
I need it all to look like the bottom part that is longer. The problem is that the type is already broken up into a column with specific line lengths. I need to make them all into one line essentially so that if i were to resize the page, they would resize. Sorry if this is confusing, I can clarify if it doesn't make any sense to you guys Thanks in Advance Andrew |
#2
|
||||
|
||||
![]()
In the find and replace, under 'more > special' you can find the paragraph marker (^p). With a bit of fiddling, you will find that that is all you need!
Ctrl+H will bring up the Find and Replace menu First Find [^p^p] Replace [**] then Find [^p] Replace [ ] - 1 space finally Find [**] Replace [^p^p] This then takes all the paragraphs (1 marker at the end of the paragraph, and one clear space in between) and turns them into another symbol [**], then it takes all the paragraph markers that are at the end of each line and replaces them with a space - this gets all the lines back together, finally replacing all the paragraph breaks. This is only a rough idea, whether you need to tweak it is dependent on your file. If you record this as a macro in Normal.dot, the you can run it again later, when you want to format another document! |
#3
|
|||
|
|||
![]()
wow, thanks for the fast response time.
This is almost exactly what I, i tried it out, and it worked almost perfectly. What happened was i ran it on the entire document, which is several hundred pages long, and it compressed it into one large paragraph. This is an improvement over what i had before, but not the paragraphs that are supposed to exist in the book are gone. Is there any way that I can have word only do that command to paragraphs that start with a lowercase letter? this would work for 99% of the time because formal paragraphs start with an uppercase letter, and there broken paragraphs do not unless the word that appears first in a proper noun or something capitalized. That tiny margin for error really doesnt make any difference to me. If you know some way that i can make that happen, I would be so happy! Thanks Again! Andrew |
#4
|
||||
|
||||
![]()
I would say the quickest, and probably most accurate, way would be to run through the document and add your [**] symbols yourself, then just Find and Replace the paragraph markers. - I know that this isn't the ideal solution, but having done the same thing that you are aiming to do, and having done it a million and one times, I just found it the most accurate!
It IS possible to write some VBA code to do what you want - BUT, it WON'T be anywhere near as accurate. For example, you asked about sorting it by paragraph - the problem is, your document has a paragraph marker at the end of every line, oops! How about adapting your search string and turning it into a VBA code string: Code:
Sub Find_and_Replace_Loop() ' Code String Written by Bird - 2009 ' This macro will find and replace ' a) all full stops, question marks and exclamation marks followed by double paragraph markers ' b) 2 paragraph markers together - this is repeated in case there are 3 or four together ' c) all single paragraph markers, into spaces ' d) finally putting paragraph markers back. Selection.Find.ClearFormatting With Selection.Find .Text = ".^p^p" .Replacement.Text = ".**" .Forward = True .Wrap = wdFindContinue .Format = False .MatchCase = False .MatchWholeWord = False .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False End With With Selection.Find .Text = "?^p^p" .Replacement.Text = "?**" .Forward = True .Wrap = wdFindContinue .Format = False .MatchCase = False .MatchWholeWord = False .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False End With With Selection.Find .Text = "!^p^p" .Replacement.Text = "!**" .Forward = True .Wrap = wdFindContinue .Format = False .MatchCase = False .MatchWholeWord = False .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False End With With Selection.Find .Text = "^p^p" .Replacement.Text = "^p" .Forward = True .Wrap = wdFindContinue .Format = False .MatchCase = False .MatchWholeWord = False .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False End With With Selection.Find .Text = "^p^p" .Replacement.Text = "^p" .Forward = True .Wrap = wdFindContinue .Format = False .MatchCase = False .MatchWholeWord = False .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False End With With Selection.Find .Text = "^p^p" .Replacement.Text = "^p" .Forward = True .Wrap = wdFindContinue .Format = False .MatchCase = False .MatchWholeWord = False .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False End With With Selection.Find .Text = "^p" .Replacement.Text = " " .Forward = True .Wrap = wdFindContinue .Format = False .MatchCase = False .MatchWholeWord = False .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False End With With Selection.Find .Text = "**" .Replacement.Text = "^p" .Forward = True .Wrap = wdFindContinue .Format = False .MatchCase = False .MatchWholeWord = False .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False End With Loop End Sub Have a go at it and see if you can adapt it to your needs. To add the VBA code:
To run it - (2003) Tools > Macro > Macros (or Alt+F8) (2007) View > Macros > View Macros (or Alt+F8) Have fun with the code - play around with it to suit your needs. |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
Niko | Excel | 5 | 04-23-2009 12:05 AM |
Table of Contents Formatting | Rick5150 | Word | 1 | 03-16-2009 11:10 AM |
Re Formatting Columns? | erikjen | Word | 0 | 02-16-2009 12:25 AM |
Word Formatting | Peter B. | Word | 5 | 05-10-2006 08:13 AM |
Different page number formatting. | gerrie | Word | 0 | 04-15-2006 07:31 PM |