意図したとおりにNoProofingは動作するはずです。
Option Explicit
Private Sub Proofing_EnglishUK()
Dim oMailItm As Object
Dim oInsp As Object
Dim oMailEd As Object
Dim oWord As Object
Dim Rng As Object
Set oInsp = ActiveInspector
If oInsp.currentItem.Class = olMail Then
Set oMailItm = oInsp.currentItem
If oInsp.EditorType = olEditorWord Then
Set oMailEd = oMailItm.GetInspector.WordEditor
Set oWord = oMailEd.Application
Set Rng = oWord.Selection
Rng.WholeStory
With Rng
.LanguageID = wdEnglishUK
' This should work as intended
'.NoProofing = False
' ******* temporary *************
' Check whether .NoProofing can be set
' with a spelling error somewhere in the mail
.NoProofing = Not .NoProofing
If .NoProofing = False Then
MsgBox "Proofing on. Errors should be found."
Else
MsgBox "Proofing off. The errors will not be found."
End If
' ******* temporary *************
End With
oMailItm.Save
End If
End If
Set Rng = Nothing
Set oWord = Nothing
Set oMailEd = Nothing
Set oMailItm = Nothing
End Sub
ありがとうございました。投稿した最初のリンクでは、.LanguageID = wdEnglishUKを動作させることができますが、.NoProofingは認識されません。 –
おそらくそうではありません。あなたの質問は、**「綴りの言葉を変える」**方法を尋ねます。 – ashleedawg
NoProofingは完全に関連しています。なぜなら、言語を設定してからNoProofingを有効にすると、スペルチェッカーが無効になるため、ポイント全体が無視されるからです。 VBAでOutlookでNoProofing = Falseを設定する方法について知っていますか? –