![]() |
|
![]() |
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
![]()
Good Evenin' all,
I desperately need some help. I have right in the neighborhood of 1,000 pages of text that needs formatting. And it's...so...awful. There's GOT to be a better way! Let me try to explain what Im working on. So, I have to make study guides for a state licensure exam, and those study guides are 100% statute. The 'source' formatting is ***ked. take a look -->http://www.statutes.legis.state.tx.u.../CR.7.htm#7.05 (this is just a random example.) So, what I have is a curriculum which says something to the effect of the following 36 chapters of the penal code are mandatory, than lists the citations. I take those citations, find the law, copy and paste it into a word document...and now I need it to be neat and clean and organized. I have been wrorking on this for days. I know the answer has something to do with styles, but I can't make it happen. If ANYONE can help, can point me in the right direction...ANYTHING, i will be SO greatful. If you want to see the documents Im working with, Ill be happy to privately send them. Stressed, confused, frustrated, and desprate- Djinn Last edited by Charles Kenyon; 09-25-2014 at 06:00 AM. Reason: Mark as solved |
#2
|
||||
|
||||
![]()
OK, so I've had a look at the document in your link. There's nothing special about it that suggests it has any serious formatting problems. Indeed, the minimal formatting there can be an aid to those who want to do their own reformatting. Whilst I gather you don't like what's there, you also give no indication of what you want to do with it.
Assuming you already have some suitable Styles defined, a lot of your reformatting could probably be done via a few Find/Replace operations. But, since I don't know what you want to do or what preparatory work you've done, I don't really know. If you want help, you need to do more than bleat about what you're working with.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
![]()
Whoa there macropod, "bleat" may be a bit strong. We all have had some experience of massive chores and got frustrated.
Nevertheless, mizzdjinn, the comments are valid. We have no idea what you have done so far, or even what - exactly - you want to do. Yes Styles would be the route. Hopefully macropod's assumption (that you have suitable Styles defined) is correct. If not, that is where you need to start. |
#4
|
|||
|
|||
![]()
I totally understand what y'all are saying, and Im sorry I was so vague, I just don't really know how to explain it.
okay...try this out... this is a bit of what I've already manually (backspace, tab tab, space enter enter etc) done. And I need it all to match. I've got like 70 odd hours in this already and I know there's an easier way to do this. https://onedrive.live.com/redir?resi...nt=file%2cdocx If not, well...Ill keep doing this the old fanshioned way. :/ |
#5
|
|||
|
|||
![]() |
#6
|
||||
|
||||
![]()
I've had a look at your onedrive document. Sadly, it doesn't make any use of Word's Styles. Everything is in Word's Normal Style, overridden with hard formatting so that nothing in your document seems to look like what the Normal Style says it should. That makes even a manual conversion much harder than it needs to be. It also makes the document harder to maintain and more prone to corruption. Even your table of contents, because the document doesn't make use of Styles, has to be manually prepared, whereas in a document using Styles it can be generated and updated quite easily.
Just to give you an idea of what's possible, copy & paste the document from the link in your first post into a new document, as unformatted text. Then run the following macro. For PC macro installation & usage instructions, see: http://www.gmayor.com/installing_macro.htm Code:
Sub ReformatStatuteText() ' Turn Off Screen Updating Application.ScreenUpdating = False Dim TrkStatus As Boolean ' Track Changes flag With ActiveDocument ' Store current Track Changes status, then switch off TrkStatus = .TrackRevisions .TrackRevisions = False With .Range.Find .ClearFormatting .Replacement.ClearFormatting .Forward = True .Wrap = wdFindContinue .Format = False .MatchAllWordForms = False .MatchSoundsLike = False .MatchWildcards = True 'Delete paragraphs containing just tabs .Text = "[^t]@^13" .Replacement.Text = "" .Execute Replace:=wdReplaceAll 'Replace all double spaces with single spaces .Text = "[ ]{2,}" .Replacement.Text = " " .Execute Replace:=wdReplaceAll 'Limit paragraph breaks and manual line breaks to one 'real' paragraph per set. .Text = "[^13^11]{1,}" .Replacement.Text = "^p" .Execute Replace:=wdReplaceAll 'Delete 'Acts' paragraphs .Text = "^13Acts [0-9]{4}*^13" .Replacement.Text = "^p" .Execute Replace:=wdReplaceAll 'ReFormat 'Title' paras .Format = True .Text = "TITLE ([0-9]{1,}. )(*^13)" .Replacement.Text = "Part \1- \2" .Replacement.Style = "Heading 1" .Execute Replace:=wdReplaceAll 'ReFormat 'CHAPTER' paras .Text = "CHAPTER [0-9]{1,}. (*^13)" .Replacement.Text = "\1" .Replacement.Style = "Heading 2" .Execute Replace:=wdReplaceAll 'ReFormat 'CHAPTER' paras .Format = False .Text = "(Art. [0-9.]{1,} [!.]@.) (*^13)" .Replacement.Text = "\1^p\2" .Execute Replace:=wdReplaceAll .Format = True .Text = "Art. [0-9.]{1,} [!.]@.^13" .Replacement.Text = "^&" .Replacement.Style = "Heading 3" .Execute Replace:=wdReplaceAll End With ' Restore original Track Changes status .TrackRevisions = TrkStatus End With ' Restore Screen Updating Application.ScreenUpdating = True End Sub To make full use of this approach, you really do need to learn to use Styles - and to use them consistently. The time taken to do so will very quickly pay for itself. Check out Charles' links.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#7
|
|||
|
|||
![]()
It's a bloody mess, isn't it?
This is my first real go at this program in many many years, outside of typing a quick note/letter type thing. I was messing around with Styles, and it just seems so blasted counterintuitive...Yes, I know it's me not it. It works how it works. Thanks for the post and the help...but it's crunch time -- deadline at 8 am. I've been fooling with these things so long that Im starting to get a thousand yard stare. If tab tab enter tab is how it's gotta be, Im gonna roll with it for now. They seem to export to pdf ok, so at least that's what the students will get. I began reading the links already provided...is there any 101's that are geared more towards the functionally illiterate? ![]() Thanks so much. Ill do my best! |
#8
|
||||
|
||||
![]()
To give you an idea of what can be achieved, try running the following version of the macro on your existing Study Guide. Before doing so, though, delete all the content from your existing Table of Contents, then, to replace it, press Ctrl-F9 to create a pair of field braces, thus { }, then type 'TOC \o "1-2" \n "1-1" \h' between them, so you end up with:
{TOC \o "1-2" \n "1-1" \h} This is the field code used for a Table of Contents that the macro will now populate via the application of Heading Styles to your document. Code:
Sub ReformatStatuteText() ' Turn Off Screen Updating Application.ScreenUpdating = False Dim TrkStatus As Boolean ' Track Changes flag With ActiveDocument ' Store current Track Changes status, then switch off TrkStatus = .TrackRevisions .TrackRevisions = False With .Styles("TOC 1") With .Font .Size = 11 .Bold = True .Italic = False .ColorIndex = wdAuto End With .ParagraphFormat.Alignment = wdAlignParagraphCenter End With With .Styles("TOC 2") With .Font .Size = 11 .Bold = True .Italic = False .ColorIndex = wdAuto End With With .ParagraphFormat .KeepWithNext = False .KeepTogether = True .RightIndent = InchesToPoints(0.5) .LeftIndent = InchesToPoints(0.5) .FirstLineIndent = InchesToPoints(-0.5) .TabStops.Add Position:=InchesToPoints(6.5), Alignment:=wdAlignTabRight, Leader:=wdTabLeaderDots End With End With With .Styles("Heading 1") .Font.Bold = True With .ParagraphFormat .Alignment = wdAlignParagraphCenter .LineSpacingRule = wdLineSpaceSingle End With End With With .Styles("Heading 2").ParagraphFormat .SpaceBefore = 6 .SpaceAfter = 6 .LineSpacingRule = wdLineSpaceSingle End With With .Styles("Heading 3").ParagraphFormat .SpaceBefore = 6 .SpaceAfter = 6 .LineSpacingRule = wdLineSpaceSingle End With With .Range.Find .ClearFormatting .Replacement.ClearFormatting .Forward = True .Wrap = wdFindContinue .Format = False .MatchAllWordForms = False .MatchSoundsLike = False .MatchWildcards = True 'Delete tabs & spaces preceding paragraph breaks .Text = "[^t ]@^13" .Replacement.Text = "^p" .Execute Replace:=wdReplaceAll 'Replace all double spaces with single spaces .Text = "[ ]{2,}" .Replacement.Text = " " .Execute Replace:=wdReplaceAll 'Limit paragraph breaks and manual line breaks to one 'real' paragraph per set. .Text = "[^13^11]{1,}" .Replacement.Text = "^p" .Execute Replace:=wdReplaceAll 'Delete 'Acts' paragraphs .Text = "^13Acts [0-9]{4}*^13" .Replacement.Text = "^p" .Execute Replace:=wdReplaceAll 'ReFormat 'Title' paras .Format = True .Text = "TITLE ([0-9]{1,})[. ](*^13)" .Replacement.Text = "Part \1 - \2" .Replacement.Style = "Heading 1" .Execute Replace:=wdReplaceAll .Text = "Part [0-9]{1,}[!^13]@^13" .Replacement.Text = "^&" .Execute Replace:=wdReplaceAll 'ReFormat 'CHAPTER' paras .Text = "CHAPTER [0-9]{1,}. (*^13)" .Replacement.Text = "\1" .Replacement.Style = "Heading 2" .Execute Replace:=wdReplaceAll .Text = "[0-9]{1,}.[0-9]{1,}.[0-9]{1,}*^13" .Replacement.Text = "^&" .Replacement.Style = "Heading 2" .Execute Replace:=wdReplaceAll 'ReFormat 'CHAPTER' paras .Format = False .Text = "(Art. [0-9.]{1,})([A-Z])" .Replacement.Text = "\1 \2" .Execute Replace:=wdReplaceAll .Text = "(Art. [0-9.]{1,} [!.]@.) ([!^13]*^13)" .Replacement.Text = "\1^p\2" .Execute Replace:=wdReplaceAll .Format = True .Text = "Art. [0-9.]{1,} [!.]@.^13" .Replacement.Text = "^&" .Replacement.Style = "Heading 3" .Execute Replace:=wdReplaceAll End With .TablesOfContents(1).Update ' Restore original Track Changes status .TrackRevisions = TrkStatus End With ' Restore Screen Updating Application.ScreenUpdating = True End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#9
|
|||
|
|||
![]()
Charles and macropod have given you excellent background information, and examples. My two cents is a comment that you MUST learn to use Styles (even the basics). I would never even do a one page document with manual formatting, but a 1000 page document???? Trying to make such a beast look good and consistent is virtually impossible without Styles.
|
#10
|
|||
|
|||
![]() Quote:
Please read my CK Note the note at the beginning of my article, at least. This is from it and remains true today: "Trying to use Word without understanding and using styles is like pushing on a string. I resisted learning and using styles for years and now regret every day of those years because although that string was still very hard to push, it kept getting longer and longer, and had some very important projects tied to it! Once you understand styles and the Word concept of organizing things into Chinese boxes everything falls into place and instead of pushing a string, you can push a button that turns on the very powerful text processing machine known as Microsoft Word and it will start doing your work for you instead of running around behind you trying to undo what you thought you just did. "These statements should be even stronger for those using Word 2007-13. These versions let you use and change styles even more easily." I know it is tough. Spend a couple of hours learning how styles work and play around with them. Every minute you spend learning to use Styles will be recovered ten-fold in a very short time. A small but delightful benefit of learning to use styles is the ability to use the StyleRef Field in headers and footers. Last edited by Charles Kenyon; 09-20-2014 at 08:23 AM. Reason: formatting of quoted material |
#11
|
|||
|
|||
![]()
Finally, if you are trying to do any automatic numbering, you need to follow the instructions in another of Shauna Kelly's pages.
How to create numbered headings or outline numbering in Ribbon Versions of Word by Shauna Kelly Numbering in Microsoft Word Microsoft puts a pretty package on Word. It looks easy but it is no more easy than a construction crane or a Mack Truck. There is a lot of complexity that MS tries to hide from the user. As a shortcut, try running the Macro that Paul gave you on a copy of your document. See what happens. Installing Macros |
#12
|
|||
|
|||
![]()
*koffkoff*
What...What sorcery are you people engaged in?! That sort of thing can only be witchcraft!! In all seriousness, Im really astounded. Im going to keep playing, but a couple of things are sticking out to me already, so I hope you don't mind me asking...And yes, I AM reading. And I am SO grateful to no have to vet 9,000 links for the ones that actually give me solid information without requiring me to sign up for their BS or demand access to my camera....thank you so much, already. The first thing that is jumping out at me is that I seem to be experiencing some inconsistancy with line spacing. I have applied a 'sytle' (heh) to several selections of text. Sometimes it seems that it creates a nice little niche for itself, with a bit of separation above and below. Other times it's grinding right up on the other text, much like that creeper in the club that won't leave you alone. This remains even after I make that Styles thing over on the right pop up and 'select all xxxx instances' and 'modify' it to the spacing settings I want. Clues? Why does it sometimes apply to the chunk of text below what I've selected? How do I unapply? Last one. I would like to create one large document out of the 7 that Im working with, but I would like to keep each table of contents. Can this be done, or am I better off making each individually, than copypasta into one document? (this is just for ease of printing.) Can I in any way indicate to the Table of Contents Maker to cease it's magicing at a certain spot? You guys...are blasted saints...or devils. Not sure. Either way I like ya. Thank you SO SO much. |
#13
|
||||
|
||||
![]() Quote:
Quote:
Quote:
.TablesOfContents(1).Update And yes, it's also possible to have multiple Tables of Contents that each apply to just a specified range. Simply bookmark the range and reference the bookmark in the TOC field. For example: {TOC \o "1-2" \n "1-1" \b BookmarkName \h} See: http://office.microsoft.com/en-us/wo...005186201.aspx Or you can have your separate documents - it's entirely up to you. Mind you, the automated one is far more robust than your manual one, because it auto-updates to take account of edits or changes in pagination that sometimes occur when you change printers (yes, Word does that). For example if you add more content with new headings, click anywhere in the Table of Contents and press F9. New entries will be added automatically and the existing page numbers will adjust for any inserted/deleted content. Try that with your manual ones!
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#14
|
|||
|
|||
![]() Quote:
Sometimes a paragraph on your page is not a paragraph to Word. It depends on how the writer ended it. The only way to know is to display non-printing formatting marks. Showing non-printing formatting marks in Microsoft Word Often imported text will use line breaks rather than paragraph breaks to end a logical paragraph. In this case, Word sees everything between two paragraph marks as one paragraph. As Paul said, when you apply a paragraph style to a paragraph, it applies to the entire paragraph. Also complicating things is that Word has something called "linked" styles which act like paragraph styles (and control spacing) when applied to a paragraph but acts as a character style when applied to selected text. |
#15
|
|||
|
|||
![]()
https://onedrive.live.com/redir?resi...nt=file%2cdocm
I just wanted to show you...Annnnd you'll be pleased to know that i figured out how to export it to a pdf with the table of contents linked to the body text without any further input from me! WOOHOOOOOOO! Ya'll rock my stripey socks! You fu my manchu!!! Thanks...really... ![]() |
![]() |
Tags |
formatting, styles |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Caption Order: Figure 4 Figure 3 Figure 2 | golfarchitect13 | Word | 5 | 05-07-2014 07:15 PM |
Make a new Style available in legacy documents | BlueClearSky | Word | 3 | 11-22-2013 03:12 PM |
Combining Multiple Word Documents Heading/Figure Issues Word 2007 | grantgibson45 | Word | 1 | 09-10-2012 11:00 PM |
![]() |
WaltR | Word | 1 | 04-09-2012 11:42 AM |
Auto-updating smaller documents in a larger word file | nmawells | Word | 0 | 05-27-2010 07:20 AM |