我(非常)经常会编写一份稿件,然后将其依次发送给不同的潜在出版商,其中一些出版商可能在澳大利亚、新西兰、英国或美国。我通常在 Word 2016 中创建一个基础文档,并在文件名后附加我的母语标记(例如“MyOpEd-UK.docx”)。接下来,我选择整个文本,选择
Review -> Language -> Set Proofing Language -> Mark Selected Text As
为了更改为新西兰英语,然后我再次浏览文档,考虑建议的更改,并保存为“MyOpEd-NZ.docx”。
有没有更快捷的方法(例如创建某种键盘快捷键、命令或按钮)来完成这些步骤
- 选择所有文本(Ctrl-A)
Review -> Language -> Set Proofing Language -> Mark Selected Text As
- 选择新西兰英语
然后我就可以为这四种语言中的每一种设置 4 个快捷方式,或者其他任何内容。
答案1
答案2
您可以使用宏。为了更详细,这里有两个演示宏:
Sub ProofingLanguageEnglishUSAllStory() ' based on field updater by Greg Maxey
' https://gregmaxey.com/word_tip_pages/word_fields.html
' Charles Kenyon 6 November 2018
' https://answers.microsoft.com/en-us/msoffice/forum/all/force-all-documents-to-be-edited-in-uk-english/df6d1f8e-5426-49d9-bea0-5620d0208294
' Changes proofing language to English US in all stories of document
' Language IDs https://docs.microsoft.com/en-us/office/vba/api/word.wdlanguageid
Dim rngStory As Word.range
Dim lngValidate As Long ' do not know purpose of this
Dim oShp As Shape
lngValidate = ActiveDocument.Sections(1).Headers(1).range.StoryType
For Each rngStory In ActiveDocument.StoryRanges
'Iterate through all linked stories
Do
On Error Resume Next
rngStory.LanguageID = wdEnglishUS
rngStory.NoProofing = False
Select Case rngStory.StoryType
Case 6, 7, 8, 9, 10, 11
If rngStory.ShapeRange.Count > 0 Then
For Each oShp In rngStory.ShapeRange
If oShp.TextFrame.HasText Then
' Comment out or delete the next line if you do not want to change proofing language
oShp.TextFrame.TextRange.LanguageID = wdEnglishUS
' Comment out or delete the next line if you do not want to change the "no proofing" setting
oShp.TextFrame.TextRange.NoProofing = False
End If
Next
End If
Case Else
'Do Nothing
End Select
On Error GoTo -1
'Get next linked story (if any)
Set rngStory = rngStory.NextStoryRange
Loop Until rngStory Is Nothing
Next
End Sub
第二个是将allStyles的校对语言改为English UK:
再次改变语言识别另一种语言
这还可以确保“不检查拼写或语法”未被选中 - 如果需要,您可以删除或注释掉此行
Sub StyleEnglishUK()
' Written 21 March 2018
' Charles Kenyon
' Intended to set all styles to EnglishUK, proofing, not automatitically update
' Language IDs https://docs.microsoft.com/en-us/office/vba/api/word.wdlanguageid
'
Dim aStyle As Style
On Error Resume Next ' Some styles have no language attribute and will give an error
For Each aStyle In ActiveDocument.Styles
Select Case aStyle.NameLocal
Case "TOC 1", "TOC 2", "TOC 3", "TOC 4", "TOC 5", "TOC 6", "TOC 7", "TOC 8", "TOC 9", "Table of Figures", "Table of Authorities"
Let aStyle.AutomaticallyUpdate = True
Case Else
Let aStyle.AutomaticallyUpdate = False
End Select
Let aStyle.LanguageID = wdEnglishUK
Let aStyle.NoProofing = False
Next aStyle
Let ActiveDocument.UpdateStylesOnOpen = False ' For information on using this line, see:
' http://www.shaunakelly.com/word/sharing/willmyformatchange.html
On Error GoTo -1
End Sub
您需要输入适当的语言 ID。
- 第一个宏执行您已经在执行的操作,此外它还会在任何文本框、页眉和页脚、脚注等中选择语言。
- 第二个宏处理文档中的样式。
您可以将两个宏链接在一起,以便可以通过单个快捷方式运行它们。
更多详情可参见我的文章在 Microsoft Answers 网站上。如果您需要更多帮助或有疑问,请发表评论。