ms-wordms-officequotation-marks

Quotation Mark Problems In Word 2013


Hello Friends I have a problem with Quotation marks, so my problem is:

I have a word document (about 100 pages) and want to change quotation marks with (Find and replace), but word can't understand what I need.. here is my example....

"Test Word" you see the quotation marks I want to change them with „Test Word“ (This is the Quotation mark which used In Georgian Language).. Can you help to overcome this problem... (I also tried to use codes like ^0132) but the result is the same.

Thank you In Advanced!


Solution

  • Here is an example with the option to fully restore the straight quotes before replaceing using AutoFormat. I tested this on your question text above and worked with me.

    Sub testquotes()
    
        Selection.WholeStory
    
        Dim ReplaceQuotes As Boolean
        ReplaceQuotes = Application.Options.AutoFormatReplaceQuotes = False
    
        Dim ReplaceQuotesAsYouType As Boolean
        ReplaceQuotesAsYouType = Application.Options.AutoFormatAsYouTypeReplaceQuotes = False
    
        Selection.Find.ClearFormatting
        Selection.Find.Replacement.ClearFormatting
    
        ' Alt-0132
    
        With Selection.Find
            .Text = "„"
            .Replacement.Text = """"
            .Forward = True
            .Wrap = wdFindContinue
            .Format = False
            .MatchCase = False
            .MatchWholeWord = False
            .MatchWildcards = False
            .MatchSoundsLike = False
            .MatchAllWordForms = False
        End With
        Selection.Find.Execute Replace:=wdReplaceAll
    
        Selection.Find.ClearFormatting
        Selection.Find.Replacement.ClearFormatting
    
        ' Alt-0147
    
        With Selection.Find
            .Text = "”"
            .Replacement.Text = """"
            .Forward = True
            .Wrap = wdFindContinue
            .Format = False
            .MatchCase = False
            .MatchWholeWord = False
            .MatchWildcards = False
            .MatchSoundsLike = False
            .MatchAllWordForms = False
        End With
        Selection.Find.Execute Replace:=wdReplaceAll
    
        Selection.Find.ClearFormatting
        Selection.Find.Replacement.ClearFormatting
    
        ' Alt-0148
    
        With Selection.Find
            .Text = "“"
            .Replacement.Text = """"
            .Forward = True
            .Wrap = wdFindContinue
            .Format = False
            .MatchCase = False
            .MatchWholeWord = False
            .MatchWildcards = False
            .MatchSoundsLike = False
            .MatchAllWordForms = False
        End With
        Selection.Find.Execute Replace:=wdReplaceAll
    
    '---Comment This part to revert to straight quotes
    
        Application.Options.AutoFormatReplaceQuotes = True
        Application.Options.AutoFormatAsYouTypeReplaceQuotes = True
    
        Selection.LanguageID = wdGeorgian
        Selection.Range.AutoFormat
    
    '---Comment This part to revert to straight quotes
    
        Application.Options.AutoFormatReplaceQuotes = ReplaceQuotes
        Application.Options.AutoFormatAsYouTypeReplaceQuotes = ReplaceQuotesAsYouType
    
    End Sub