Results 1 to 15 of 15
  1. #1
    New Lounger
    Join Date
    Mar 2004
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    formating quotes (Word 2003)

    I write stories in Word 2003 and I would like to type them out and then apply a formatting that will automatically format all speach that I put in quotes to Bold. I can't find a way to do this through the help functions.

    Can anyone think of a way I can make all text in quotes change to bold easily?

    Thank you for any help you can give me.

    Teague

  2. #2
    New Lounger
    Join Date
    Mar 2004
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: formating quotes (Word 2003)

    I'm not that used to using macro's. I tried to copy and paste it into the macro section of Word 2003 but it failed to run.

    Can you tell me how I can incorporate your macro correctly?

    Thanks,

    Teague

  3. #3
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: formating quotes (Word 2003)

    Sure. See <post#=21373>post 21373</post#>. But first see the correction that I made to the macro. I forgot to start the 3rd line with an apostrophe. <img src=/S/blush.gif border=0 alt=blush width=15 height=15>

  4. #4
    New Lounger
    Join Date
    Mar 2004
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: formating quotes (Word 2003)

    Thank you, it works now.

    Is there a way I can keep the quotes though? I would like to be able to format the whole page with the quotes intact. If not maybe you have another macro that will add quotes to bold text? or is that too much to hope for?

    Thanks for your help, you've been great.

    Teague

  5. #5
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: formating quotes (Word 2003)

    Hi Teague:
    I'm not much of a VBA expert, but I'll experiment. In the meanwhile, using Find/Replace, you can:
    Using wildcards:
    Find: "*"
    Replace: ^&
    In the replace box, press Ctrl+B so that the formatting shows as bold. See attachment.
    Hope this helps,
    Attached Images Attached Images

  6. #6
    New Lounger
    Join Date
    Mar 2004
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: formating quotes (Word 2003)

    I was able to easily set up the replace box the way you had it but it didn't work at all. I even used the prior instructions you gave me using the 1 in the replace box, but that didn't work either. Are you using word 2003? I've tried to use the replace tool before with no success but I didn't know about the formating the box using control B. Thanks for the tip.

    Can you actually get the replace command to replace quoted text with bold quoted text? How are you comming up with the characters in the replace with box? Is there a place to see what these represent?

    Teague

  7. #7
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: formating quotes (Word 2003)

    Hi Teague:
    The instructions in the prior post replace the ones I first gave. The 1 will replace only what is in parenthsis & is designed to delete the quotes. Are you using smart quotes? If so, there is a different string that you must use.

    I have Word 2000, but this should work. If you have smart quotes, paste an opening quote mark, then the asterick, then the ending quote mark, in the Find box.

    The ^& replaces what is found with itself. If your cursor is in the Replace box & you click Special, you'll see it--it's called "Find what text".

    I haven't been able to modify the macro. Hopefully, one of the VBA experts will see this post & be able to help you, although Find/Replace will work.
    Cheers,

  8. #8
    New Lounger
    Join Date
    Mar 2004
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: formating quotes (Word 2003)

    That worked!!

    Thanks so much. I agree that a macro would be easier but once I cut and pasted the quotes in the string worked. I wonder why smart tags causes it to fail if you type the quotes in?

    Anyway, that made the job enormously easier.

    Thanks for all your help.

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

    Re: formating quotes (Word 2003)

    Teague

    Phil mentioned smart quotes - not smart tags. This may sound like a subtle difference but they are very different beasts in Word.

    Smart quotes are directional "quotes" which look like 66 and 99 if you zoom in on them. They are meant to show that a quote is opening and then closing. Dumb quotes have no direction and look like !! when you zoom in on them. Word automatically replaces one with the other if your autocorrect settings tell it to. I would guess that the dumb quotes typed into the find what box were not finding the directional quotes. Perhaps this was because the wildcard search was turned on.
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  10. #10
    Silver Lounger
    Join Date
    Jan 2001
    Location
    West Long Branch, New Jersey, USA
    Posts
    1,921
    Thanks
    6
    Thanked 9 Times in 7 Posts

    Re: formating quotes (Word 2003)

    Hi Phil,

    Now wait a second. Are the rules of grammar going out the door entirely? Will we be putting one space after a period soon too? <img src=/S/cop.gif border=0 alt=cop width=15 height=24>

    I have a vague recollection from way back that the rules of grammar with respect to quoted material are something like the following:
    - if quoted material runs from the end of one paragraph to the beginning of the next, then the first para does NOT have a closing quote while the next one has an opening quote.

    Not sure why. But, w/o analyzing "your" macro (I almost fainted when I saw your opening line until I looked at the macro <img src=/S/laugh.gif border=0 alt=laugh width=15 height=15>), I would have to ask if it would leave "grammatically correct" quoted material alone if it spans paras? If so, can you add a few lines to take care of these cases also?

    Speaking of smart quotes, I have the option checked to AutoFormat as you type to correct regular quotes (!!) with smart quotes (6699) - always have. Yet, I'd say about 50% of the time I still get dumb quotes. Even within the same document, I can have some dumb quotes and some smart ones - even tho dumb me only types dumb kwoates. Any clues on that one? <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

    Fred

  11. #11
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: formating quotes (Word 2003)

    Hi Teague:
    The following macro, QuotesToBold, will check the current paragraph for quoted material. If there is any, it will delete the quotes and change the text between the quotes to bold. If the quote marks are unbalanced (there is an opening or closing quote mark with no corresponding closing or opening quote mark), then the quote mark is ignored and no changes are made. The macro will work with either regular quotes or smart quotes.

    <pre>Sub QuotesToBold()
    ' from Allen Wyatt WordTips
    ' http://www.VitalNews.com/wordtips/
    Dim Redo As Integer, Ptr As Integer, Ptr1 As Integer
    Dim P As String, P1 As String
    If Selection.ExtendMode Then Exit Sub
    Redo = -1
    While Redo
    Selection.StartOf Unit:=wdParagraph, Extend:=wdMove
    Selection.MoveEnd Unit:=wdParagraph
    P = Selection.Text
    Ptr = InStr(P, Chr(34))
    If Ptr = 0 Then Ptr = InStr(P, Chr$(147))
    If Ptr > 0 Then
    Selection.MoveLeft Unit:=wdCharacter, Extend:=wdMove
    Selection.MoveRight Unit:=wdCharacter, Count:=Ptr
    Selection.MoveEnd Unit:=wdParagraph
    P1 = Selection.Text
    Ptr1 = InStr(P1, Chr(34))
    If Ptr1 = 0 Then
    Ptr1 = InStr(P1, Chr$(148))
    EndChar = Chr$(148)
    Else
    EndChar = Chr$(34)
    End If
    If Ptr1 > 0 Then
    Selection.MoveLeft Unit:=wdCharacter, Count:=2, Extend:=wdMove
    Selection.Delete Unit:=wdCharacter
    Selection.MoveRight Unit:=wdCharacter, Count:=Ptr1 - 1, _
    Extend:=wdExtend
    Selection.Font.Bold = True
    Selection.MoveRight Unit:=wdCharacter, Extend:=wdMove
    Selection.Delete Unit:=wdCharacter
    Else
    Selection.MoveRight Unit:=wdCharacter, Extend:=wdMove
    Redo = 0
    End If
    Else
    Selection.MoveRight Unit:=wdCharacter, Extend:=wdMove
    Redo = 0
    End If
    Wend
    End Sub</pre>


    You could also use Find/Replace by using wildcards &:
    Find: "(*)"
    Replace:1
    where you also place the cursor in the Replace box & press Ctrl+B (to change the formatting to bold). However, Find/Replace doesn't check for the number of quotes & if you start in the wrong place, everyrthing but quoted material is changed to bold. Of course, you could immediately press undo, & then place the cursor in the correct spot.
    Cheers,

  12. #12
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: formating quotes (Word 2003)

    Hi Fred:
    I wasn't addressing any grammer issues. <img src=/S/laugh.gif border=0 alt=laugh width=15 height=15> I'm not a VBA expert, so I don't know how to modify the macro to take care of cases where quotes run several paragraphs. I copied the macro from another source (which is listed in the macro).

    As far as having smart quotes not work 50% of the time, I haven't heard of that before & couldn't find anything on the KB. I do know that it doesn't work inside of fields.

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

    Re: formating quotes (Word 2003)

    Fred
    I'll stay away from a firefight with the Grammar Police but I have some suggestions for your dumb/smart quote files. I have seen files with a mixture of quote types but I put this down to pasting in content from another file which had the alternate setting going. Whenever I notice it, I do a search and replace of single quote/single quote and double quote/double quote which replaces any dumb quotes with their smart equivalent (because I also like the smart quotes option ticked).

    This search and replace does not require a directional replacement quote in order to work.
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  14. #14
    Silver Lounger
    Join Date
    Jan 2001
    Location
    West Long Branch, New Jersey, USA
    Posts
    1,921
    Thanks
    6
    Thanked 9 Times in 7 Posts

    Re: formating quotes (Word 2003)

    Hi Phil,

    No offense intended. I saw the line with Alan Wyatt's name in the macro so knew the source. As far as the issue with grammar, I raised it in case it was important to the original poster and in case he/she didn't realize it. I'm not one big on following all the rules of grammar as I learned them in school ages ago (eg, sentences can't end with a preposition, punctuation always inside the quote, etc).

    Although I don't think I could create the VBA, I don't think it would be hard to add something for the grammatical issue I raised. If you find an opening quote somewhere in a para, get to the end of the para and find no closing quote, then check the first char of the next para (assuming a next para exists). If it's a quote, then treat the para (the one with the unbalanced opening quote) as ending with a quote and do your bolding (but there's no quote to remove). If not, then leave it alone (the opening quote is unbalanced).

    Also, my item on the smart/dumb quotes was not anything to do with fields.

    Fred

  15. #15
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: formating quotes (Word 2003)

    No offense taken, Fred. <img src=/S/smile.gif border=0 alt=smile width=15 height=15>
    <hr>I'm not one big on following all the rules of grammar as I learned them in school ages ago (eg, sentences can't end with a preposition<hr>
    Me too! That is a proposition up with which I cannot put. <img src=/S/grin.gif border=0 alt=grin width=15 height=15>

Posting Permissions

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