• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL

Chapter 10. Working with Word and Excel Files > Creating a Word Text Style

Creating a Word Text Style

Microsoft Word relies heavily on CSS to preserve formatting. If you save your text formatting in Word as named paragraph styles, these names will be carried over into Dream weaver as the names of CSS classes.

To save formatting as a Word paragraph style

In Microsoft Word or Excel, click within the text that's formatted in a way you want to reuse. In Excel, you may need to select the entire row to make the next step possible.

From the Word or Excel menu bar, select Format > Styles and Formatting (or just Format > Styles). The Styles dialog box will appear (Figures 10.1 and 10.2). If you're using Excel, skip to Step 4.

Figure 10.1. The Format Style dialog box shows you an initial list of the existing styles in your Word template.

Figure 10.2. In the Excel Style dialog box, type a name for your style and then, if you like, click Modify to change the font face and so on.

The template is the document that stores all the styles. (You can use others' templates or create your own, but the main template stored in your user data folder is called Normal.dot.)

Click New. The New Style dialog box will appear, displaying a paragraph style description based on your selection (Figure 10.3). You can retain this style description as-is, or you can click Format and then Font or Paragraph to add formatting to your style and to your selection.

Figure 10.3. The New Style dialog box presents you with all the formatting surrounding the text that was selected when you started with Step 1.

Type a name for your style in the Name text box (Figure 10.4).

Figure 10.4. The most important part in this exercise is the name.

Naming your styles descriptively will come in handy and save you time in both Word and Dreamweaver. If you skip naming them, Word will create sequential names such as Style1 for every distinct text style in your document, presenting you with the problem of discerning which one is which when you want to reuse them.

In the New Style dialog box (or the Modify Style dialog box, if you're updating an existing style), you can choose a style type from the eponymous drop-down menu: Paragraph or Character.

Paragraph styles create and modify text blocks, whereas character styles define typographical choices for selections that do not have to be entire paragraphs. If you name and use either kind of style in Word, your names and definitions can be used in Dreamweaver as CSS classes. Character styles will be applied using the <span> tag, which is how both Word and Dreamweaver apply CSS to selections that are not entire paragraphs.

In general, Word and Dreamweaver will choose the <p> tag for a text block; other kinds of text blocks are <div>, <blockquote>, and the various levels of headers and list items.

Add or edit any attributes of the style that you want to include in both the Word document and the eventual HTML document. You can do this by clicking the Format menu and selecting Font or Paragraph, and then making changes in the resulting dialog boxes.

Click on OK and Close to return to the Word window. Depending on your version, you'll see your style listed in the Formatting palette (Word X, 2004) or on the Formatting toolbar (Word 97, 98, 2000, XP).



Not a subscriber?

Start A Free Trial

  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint