AllExperts > Microsoft Word 
Search      
Microsoft Word
Volunteer
Answers to thousands of questions
 Home · More Microsoft Word Questions · Answer Library  · Encyclopedia ·
More Microsoft Word Answers
Question Library

Ask a question about Microsoft Word
Volunteer
Experts of the Month
Expert Login

Awards

About Us
Tell friends
Link to Us
Disclaimer

 
 
 
 
About Suzanne S. Barnhill
Expertise
I've been using Word for Windows since version 2.0 (1992), and the more I learn about it, the more I realize how little I know. But I may know a few things that you don't, and I'll help if I can. I answer many questions every day in Microsoft's peer support newsgroups and as a result have been awarded the MVP (Most Valuable Professional) designation by Microsoft Corporation. You may be able to find the answer to your question at the Word MVPs' FAQ site or at my own Word FAQ site, so please check those first! Please, no questions about VBA (macros), Registry editing, networks, or complex merges, as I have no experience with these aspects of Word, nor do I have any experience with Word for the Mac.

Experience
I have a master's degree in classics (Latin), which is surprisingly helpful, though I no longer teach. The things I am proudest of: Having raised two children to maturity, both Merit Scholars, both college graduates (one a philosophy major!), one Phi Beta Kappa (from Harvard!); having been made a Paul Harris Fellow by my Rotary club; having been designated a Microsoft MVP.

Education/Credentials
B.A. (Latin), Agnes Scott College, 1966; M.A. (Classics), Emory University, 1972.

 
   

You are here:  Experts > Computing/Technology > Microsoft Software > Microsoft Word > deleting all field code

Microsoft Word - deleting all field code


Expert: Suzanne S. Barnhill - 7/10/2009

Question
I have a document that was exported from RoboHelp to Word, and it carried along the index entries, inserting them at the start of each heading, like this: {XE "xxx"\*MERGEFORMAT}
I've searched the forums and can't see any advice for stripping out all field code text.
After I've stripped that all out, I want to extract all the headings (~60) and only the first paragraph that follows each heading, for a separate document. Is there an easier way than cut/paste? I guess that's a separate question...

Answer
Clearing out the XE fields is easy enough, not that leaving them in would do any harm. You can do it with Replace.

1. Display Hidden text so that the XE fields are displayed.

2. Ctrl+H to open the Replace dialog.

3. In the "Find what" box, type "^19 XE" (without the quotation marks).

4. Leaving the "Replace with" box empty, click Replace All.

The second part should be easy as well, but I can't seem to come up with any way to do it that isn't a bit complicated. Here's one way that does work, at least:

1. Ctrl+H to open the Replace dialog.

2. Click More to expand the dialog and check the box for "Use wildcards."

3. With the insertion point in the "Find what" box, click Format, choose Style, and select Heading 1. You should see "Style: Heading 1" below the "Find what" box.

4. In the "Find what" box, type (*)(^13). The paragraph marks split the text into two parts: the paragraph text and the paragraph mark, so that they can be referenced with \1 and \2 in the "Replace with" text.

4. In the "Replace with" box, type zzz\1zzz\2 and click Replace All. This will add zzz at the beginning and end of every Heading 1 paragraph.

5. Switch to the Find tab of the dialog and click No Formatting to clear the Heading 1 style.

6. Select "Main document" under "Highlight all items found in."

7. In the "Find what" box, type zzz*zzz^13*^13. This will search for the text you have set off with zzz, followed by any amount of text followed by a paragraph mark (that is, your Heading 1 plus the following paragraph.

8. Click Find All. This should result in all Headings 1s and their following paragraphs being selected.

9. Click the title bar of your document to return focus to the document without deselecting the text and press Ctrl+C to copy the text.

10. Paste the copied text into a new document.

Suzanne S. Barnhill
Microsoft MVP (Word) 1999-2009  

Add to this Answer   Ask a Question


 
About Microsoft Word
This topic answers questions related to Microsoft Word stand-alone or Mircrosoft Office Word including Word 2003, Word 2007, Office 2000, and Office XP. You can get Word help on formatting text, tables, tabs, fonts, styles, general Word layouts, bullets, headings, and outlines, using templates, toolbar modifications, and using Track Changes. You may also find tips on linking Word and Excel embedded objects including charts. This site does not provide a general Word tutorial nor the basics of using a word processor. It provides specific answers to using Microsoft Word only. If you do not see your Word question answered in this area then please ask a Word question here
User Agreement | Privacy Policy | Kids' Privacy Policy | Help
Copyright  © 2008 About, Inc. AllExperts, AllExperts.com, and About.com are registered trademarks of About, Inc. All rights reserved.