Word 2013中的引号问题

时间:2016-10-21 08:41:42

标签: ms-word ms-office quotation-marks

Hello Friends我的引号有问题,所以我的问题是:

我有一个word文档(大约100页),想要用(查找和替换)更改引号,但是单词无法理解我需要的东西..这是我的例子....

“测试词”你看到引号我想用“测试词”改变它们(这是用于格鲁吉亚语言的引号)..你能帮助克服这个问题......(我也试过了)使用像^ 0132这样的代码,但结果是一样的。

谢谢高级!

2 个答案:

答案 0 :(得分:2)

很简单,打开文档并运行以下宏:

Sub TestFormatQuotes()

    Selection.WholeStory
    Selection.LanguageID = wdGeorgian
    Selection.Range.AutoFormat

End Sub

这将选择整个文档,将语言设置为格鲁吉亚语,并通过运行自动套用格式,引号将自动替换为左下角和右上角。

您可以手动执行此操作,方法是使用“文件选项 - 快速访问工具栏”将“自动套用格式”按钮添加到快速访问工具栏,然后在左侧列表中选择“不在功能区中的命令”。如果您的自动套用格式设置正确(检查自动套用格式对话框中的选项,自动套用格式选项卡,替换,“直线引号”到“智能引号”选项已启用),这将自动替换所有直接引号。

答案 1 :(得分:1)

以下示例提供了在使用自动套用格式替换之前完全恢复直引号的示例。我在上面的问题文本中对此进行了测试并与我合作。

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