Converting Smart Quotes to Straight Quotes in Word 2007

Microsoft Word, Tips & Tricks Add comments

mswordtweak.pngThe quotation marks available via the keyboard-the single quote (‘) and the double quote (”)-are fine in most cases, but they’re decidedly plain. For more formal documents, you might prefer to use the curly quote variations where ‘ and ‘ replace the single quote and ” and ” replace the double quote. You can enter these quotation marks using your keyboard. Here are the codes:

Press

To Get

Alt+0145

Alt+0146

Alt+0147

Alt+0148

In each case, be sure to use your keyboard’s numeric keypad to type the numbers.

You can also set up Word to convert straight quotes (’ and “) into “smart” quotes (such as ‘ and “) automatically. This is part of the AutoCorrect’s AutoFormat As You Type feature and is turned on by default in most Word installations. To make sure, choose Office, Word Options, click Proofing, click AutoCorrect Options, and then display the AutoFormat As You Type tab. Make sure the Straight Quotes with Smart Quotes check box is activated and then click OK in all open dialog boxes.

The opposite situation is when you have a document that contains smart quotes and you want to convert them all to straight quotes. This is a common scenario when you want to send the document to a page layout program, commercial printer, web page, and email message. In most cases, the destination program won’t recognize the smart quotes and will substitute garbage characters for them. To avoid this, you need to convert each smart quote into its equivalent straight quote. Unfortunately, a typical document might contain dozens of quotation marks, and Word offers no feature for converting quotation marks. You might think a find-and-replace operation would do the trick, but that doesn’t work because Word reconverts the regular quotes back to smart quotes. Fortunately, you can work around this limitation by using the VBA macro shown in Listing 1.

Listing 1 A VBA macro that converts smart quotes into straight quotesA VBA macro that converts smart quotes into straight quotes

For this macro to work, the “Straight Quotes” with “Smart Quotes” check box must be temporarily deactivated. So the macro begins by taking the current value of this setting (as given by the AutoFormatAsYouTypeReplaceQuotes property) and storing it in the

blnAutoFormatQuotes Boolean variable. Then the macro turns off the features (by setting the AutoFormatAsYouTypeReplaceQuotes property to False). The macro then runs four sep­arate Replace operations, one for each type of smart quote. Finally, the macro restores the value of the AutoFormatAsYouTypeReplaceQuotes property.

Technorati Tags: , ,

Popularity: 2% [?]

If you liked this post, would you please buy me a twelve-ounce lattes for only $2

Related Post

  • Converting Mainframe Dates to Excel Dates in Excel 2007
  • Adding a Live Stock Price Quote to a Worksheet in Excel 2007
  • Converting Uppercase Words to Another Case in Word 2007
  • Using Continuous Numbers in Two Separate Numbered Lists in Word 2007
  • Converting a Word 2007 Outline into a PowerPoint Presentation
  • Don't Find What You're Looking For? Please Try Here...

    Google
     

    Leave a Reply

    WP Theme & Icons by N.Design Studio
    Entries RSS Comments RSS Add to Technorati Favorites Log in