wordsite.com

   
 


Frequently Asked Questions about Word

Documents and templates

Headers and footers and page numbers

Find-and-replace

A few words about Word's draw layer

Working with graphics

Printing

Customizing Word

Unexpected behavior

Miscellaneous How-To . . .

How Word Differs from WordPerfect

Microsoft is a registered trademark of Microsoft Corporation
 
 

   


Find and replace

Click a topic:

Delete html tags or sgml tags or other bracketed tags (<EXAMPLE>) from a document without affecting other text.

Transpose dates mm/dd/yy to yy/mm/dd (Example: from 12/17/85 to 85/12/17).

Eliminate carriage returns (paragraph marks) at the end of each line but not at the end of each paragraph.

Put a page break in front of each Header 1 paragraph.

Modify the path or filename in a series of hyperlink fields.

Replace any instance of the left square bracket character "[" that happens to be the fifth character in a paragraph.

Delete html tags or sgml tags or other bracketed tags (<EXAMPLE>) from a document without affecting other text. <Top of Page>

Solution:
Use Word's Find and Replace dialog, as follows:
1. In the Find What box, enter the following string: "\<*\>" WITHOUT THE QUOTES.
2. Leave the Replace With box empty.
3. Place an X in the "Use Wildcards" box.
4. Click Replace all.

Transpose dates from mm/dd/yy to yy/mm/dd. <Top of Page>
Example: from 12/17/85 to 85/12/17

Solution:
Use Word's wildcard find-and-replace capabilities.
1. Click More... in the Replace dialog box and check Use Wildcards.
2. Enter the following values into the replace dialog:
Find What:
([0-9]{1,2})/([0-9]{1,2})/([0-9]{1,2})
Replace With:
\3/\1/\2
3. Click Replace All and dates are all transformed, including any errant dates where the user left out the leading zero, such as 6/6/98.

Eliminate carriage returns (paragraph marks) at the end of each line but not at the end of each paragraph. <Top of Page>

Solution:
Replace all occurrences of the paragraph mark (carriage return) throughout the document. But first protect any double carriage returns, since these represent true paragraph boundaries.

1. Choose Replace on the Edit Menu.
2. In the Find What box, enter ^p^p
3. In the Replace With box, enter QQQ
4. Click Replace All
5. Click OK when Word tells you it has done the replacement Now you've got some goofy triple-Q marks in your doc. We'll get rid of them in a minute.
6. In the Find What box, enter ^p
7. In the Replace With box, enter a space character (" ", but without the quotation marks)
8. Click Replace All
9. Click OK when Word tells you it has done the replacement.
10. In the Find What box, enter QQQ
11. In the Replace With box, enter ^p
12. Click Replace All
13. Click OK when Word tells you it has done the replacement.
14. In the Find What box, enter two spaces (" " but without the quotation marks)
15. In the Replace With box, enter one space (" " but without the quotation marks)
16. Click Replace All
17. Click OK when Word tells you it has done the replacement

Put a page break in front of each Header 1 paragraph. <Top of Page>

Solution #1:
Change the Header 1 style so that it includes the "Page Break Before" attribute. This will force each new Heading 1 paragraph to start on a new page.
1. Choose Style on the Format menu.
2. Select Heading 1 and click Modify.
3. Pull down the Format list and select Paragraph.
4. Click the Text Flow tab at the top of the dialog.
5. Check Page Break Before.
6. Click OK, OK, Close.

Solution #2:
Use the Find And Replace Dialog to insert a page break immediately before each Heading 1 paragraph.
1. Choose Replace on the Edit menu.
2. Click inside the Find What box, then pull down the Format list and choose Style.
3. Click Heading 1 and click OK.
4. Click inside the Replace With box and enter the following characters: ^m^&
5. Click Replace All

Modify the path or filename in a series of hyperlink fields. <Top of Page>

Solution:
1. Pres Alt+F9 to turn on field codes.
2. Do a find and replace to change the file references.
3. Press Alt+F9 again to turn off field codes.

Replace any instance of the left square bracket character "[" that happens to be the fifth character in a paragraph. <Top of Page>

Solution:
In the Replace dialog box, click MORE, then check Use Wildcards and enter the following strings:
Find What: "(^13????)\[" 'without the quotation marks
Replace With: "\1" 'without the quotation marks