![]() |
|
#1
|
|||
|
|||
![]()
Engine, I am not familiar with the technique you mentioned, and it did not work for me (see attached), but it looks useful.
Questions: 1. What do you mean "loop"? Is this a macro function or a regular command I have never heard of? 2. In the attached, I styled two lines as Heading one, saved the doc to a txt file, opened a new Word docx, pasted the text in, ran Find and Replace with <:h1> in Find field and the Heading 1 style in Replace, and replaced all. Please explain what happened. Thanks. |
#2
|
|||
|
|||
![]() Quote:
![]() Error as to paragraph styles: see next two posts You need to identify the beginning and end of the replace area. i.e select the paragraph that begins with <:h1> and apply Heading 1 style. Macros to do this sort of thing need to be written rather than recorded. Otherwise, you could bracket <:h1>the text<:h1> you want the style applied to and use WildCards to do the replace. I know this can be done, just don't have the experience to tell you how. Find and Replace Using Wildcards by Graham Mayor Last edited by Charles Kenyon; 10-24-2013 at 12:25 AM. |
#3
|
|||
|
|||
![]()
Charles, may I venture to disagree? for paragraphs, I'm not sure that paired XML-style tags would help. They'd take longer to put in to the original Word file, unless you have a helpful colleague who can write a macro to top and tail each paragraph with the name of its current style, and would probably be tricker to run search/replace on. Beautifully prepared text with significant character styles <cite>, <strong>, <emphasis> would be a different case.
John, an observation/apology: I should have added 'remove all autonumbering' as something to do before saving as .txt – the default behaviour here is one of the differences between Word and my usual documentation tool. My failure to do so probably accounts for the duplicate numbering: it looks as though the first (leftmost) number is being applied by the style, while the second is just text. As for the persistence of the <:h1> tag, it's a question of how you beat search/replace into submission. Let's say your input file starts like this: Code:
<:h1>On the Insert tab <:p>The galleries include items that are designed to coordinate with the overall look of your document. You can use these galleries to insert tables, headers, footers, lists, cover pages, and other document building blocks. When you create pictures, charts, or diagrams, they also coordinate with your current document look. You can easily change the formatting of selected text in the document text by choosing a look for the selected text from the Quick Styles gallery on the Home tab. <:h1>Both the Themes gallery <:p>and the Quick Styles gallery provide reset commands so that you can always restore the look of your document to the original contained in your current template. On the Insert tab, the galleries include items that are designed to coordinate with the overall look of your document.
|
![]() |
Thread Tools | |
Display Modes | |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
Stephski | Word | 2 | 11-30-2012 05:00 AM |
![]() |
antztaylor | Excel | 5 | 11-08-2012 09:54 PM |
![]() |
triodia | Word | 2 | 05-07-2012 02:03 AM |
Word headings not numbering correctly? | rbilleaud | Word | 4 | 08-03-2011 08:46 AM |
Reverse order of headings throughout Word | my_vine_figtree | Word VBA | 1 | 08-17-2010 01:46 AM |