Results 1 to 11 of 11
  1. #1
    Star Lounger
    Join Date
    Jan 2002
    Location
    Houston, Texas, USA
    Posts
    91
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Smart Quotes with Index (Word 2003)

    All defined terms in my document are in quotes and are indexed. I want to replace straight quotes with smart quotes throughout the document. When I do a global search and replace, my smart quotes around defined terms have a beginning quote at the front and a beginning quote at the end of the defined term. Is there a workaround for this?

  2. #2
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,852
    Thanks
    4
    Thanked 259 Times in 239 Posts

    Re: Smart Quotes with Index (Word 2003)

    What is the character at the end of the defined term? If there is a space immediately in front of that quote then the smart quote will be an opening quote.

    If the item in front of the closing quote mark is an index field then you might want to experiment with the text in that field to trim the extra spaces there too.
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Smart Quotes with Index (Word 2003)

    Select Tools | AutoCorrect Options...
    Activate the Format As You Type tab.
    Make sure that the check box for "Straight quotes" with "smart quotes" is ticked.
    Click OK.

    Select Edit | Replace...
    Enter a straight double quote " in both the Find what and Replace with boxes.
    Click Replace All.
    Word will automatically apply smart quotes, and it should alternate opening and closing quotes.
    If desired, repeat with a straight single quote '.

    If you don't want to use smart quotes all the time, you can clear the check boxe mentioned above again.

  4. #4
    Star Lounger
    Join Date
    Jan 2002
    Location
    Houston, Texas, USA
    Posts
    91
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Smart Quotes with Index (Word 2003)

    It varies. It may be at the beginning of the sentence and typed: "Court" ... When indexed it would look like this: “Courts{ XE "Court" }"

    It may be in the middle of a sentence and be enclosed in parentheses, like this: ("Court"). When indexed it would look like this: (“Courts{ XE "Court" }")

    Either way, if I manually select the first quote and type a quote over it and then do the same for the end quote, it works fine. However, a global search and replace replaces the end quote with a begin quote.

    It is my understanding that this is some quirk in Word because Word "hides" a quote within the index. If that's the case, then perhaps someone knows of a workaround?

  5. #5
    Star Lounger
    Join Date
    Jan 2002
    Location
    Houston, Texas, USA
    Posts
    91
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Smart Quotes with Index (Word 2003)

    You're right, Hans, that changes the straight quotes to smart quotes in pairs. However, I'm not getting my pairs when the text is indexed. (And it doesn't matter if my hidden text is showing.) I'm only getting a beginning quote at the beginning of the word and a beginning quote at the end of the word.

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Smart Quotes with Index (Word 2003)

    OK, I see what you mean. The quotes in the index entry throw off Word's algorithm. It would have been best to create the smart quotes before marking the index entries. It would have been done correctly then.

    If you turn off automatic smart quotes, you can enter of copy an opening smart quote in the Find what box (it's Alt+0147) and a closing smart quote (Alt+0148) in the Replace with box, and go through the document replacing only where needed.

  7. #7
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,852
    Thanks
    4
    Thanked 259 Times in 239 Posts

    Re: Smart Quotes with Index (Word 2003)

    The search and replace seems to fail miserably in working out to put a closing quote where it should be - being specific with the Alt+0148 is ignored in the search and replace dialog in this special case.

    The only other thing I would suggest is to make sure that the Index entries are placed AFTER the closing quote instead of inside them. This would allow the quotes to work the way you expect.

    I was hoping to find a simple way to do a search and replace to move the closing quote in front of the index entries but was thwarted by the fact that ^d can't be used in Wildcard searches. This means that the only way I can see is to build a macro to perform this task.
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  8. #8
    Star Lounger
    Join Date
    Jan 2002
    Location
    Houston, Texas, USA
    Posts
    91
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Smart Quotes with Index (Word 2003)

    Any thoughts on globally deleting all of the indexes?

  9. #9
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,852
    Thanks
    4
    Thanked 259 Times in 239 Posts

    Re: Smart Quotes with Index (Word 2003)

    To globally delete all the index entries do a search for "^d XE" (without the quotes and with the space between the d and the XE) and replace with nothing.

    Does this mean you are not using the index entries anymore or are you planning to rebuild this with a concordance table after you have fixed the smart quotes?
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  10. #10
    Star Lounger
    Join Date
    Jan 2002
    Location
    Houston, Texas, USA
    Posts
    91
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Smart Quotes with Index (Word 2003)

    Thanks, Andrew! We don't need the indexes any more, so I'm getting rid of them. I'd sure like to know what's causing that little glitch though.

  11. #11
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Smart Quotes with Index (Word 2003)

    I'm only guessing here, but I suspect that the presence of an XE field (index entry) "resets" the internal counter that Word uses to determine whether the next smart quote should be an opening one or a closing one.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •