
次の問題が発生しています: Outlook 2010 (または一般的な Outlook) では、HTML 形式の電子メールに返信すると、受信した電子メールの一部の書式が使用されます。
段落設定がテンプレートと異なることがよくあります。書式設定を標準設定に変更する簡単な方法を見つけました。
開いたメールのリボンで、
「テキストの書式設定」タブを選択し、右側の「スタイルの変更」をクリックし、「スタイル セット」を選択して、「Word 2003」を選択します。
ここで、「返信」、「全員に返信」、または「転送」を選択したときにそのタスクを自動的に実行するマクロを作成したいと思います。
残念ながら、Outlook にはマクロ レコーダーがありません :( 似たようなものを見つけましたが、まったく応答がありません:Outlook 2007: 返信と転送で既定の書式が使用されない
または、このマクロは機能しません:http://www.codetwo.com/admins-blog/set-email-reply-format-automatically/
上記の手順を GUI で実行するためのマクロ コードは何でしょうか?
答え1
必要なスタイルセットを適用して選択するだけですデフォルトとして設定下部のスタイルの変更メニュー。
または、次のようにすることもできます。
Public WithEvents OutlookInspectors As Outlook.Inspectors
Public WithEvents OutlookInspector As Outlook.Inspector
Private Sub Application_Startup()
Set OutlookInspectors = Application.Inspectors
End Sub
Private Sub OutlookInspectors_NewInspector(ByVal Inspector As Inspector)
Set OutlookInspector = Inspector
End Sub
Private Sub OutlookInspector_Activate()
On Error Resume Next
Dim Item As MailItem
If Not OutlookInspector Is Nothing Then
Set Item = OutlookInspector.CurrentItem
If Not Item Is Nothing And Item.Size = 0 Then
OutlookInspector.WordEditor.ApplyQuickStyleSet "Word 2003"
End If
End If
Set OutlookInspector = Nothing
End Sub