Outlook 2010 리본 버튼으로 글꼴을 변경할 수 있나요?

Outlook 2010 리본 버튼으로 글꼴을 변경할 수 있나요?

강조 표시된 텍스트의 글꼴을 "Courier New"로 변경하고 글꼴 크기를 10포인트로 줄이는 단추를 Outlook 2010 리본에 추가할 수 있습니까? 전체 문서가 아니라 강조 표시된 텍스트만 해당됩니다.

이를 위해 글꼴을 두 번 클릭하고 글꼴 크기를 두 번 클릭해야 하면 손목 터널이 악화됩니다.

답변1

매크로를 사용하면 작동하지만 Outlook에서 경고하는 매크로를 활성화해야 합니다.

http://msdn.microsoft.com/en-us/library/ee814736%28v=office.14%29.aspxmaros를 활성화하고, 매크로를 만들고, 리본에 추가하는 방법을 보여줍니다.

https://stackoverflow.com/questions/20624331/vba-macro-to-highlight-selected-text-in-current-email-message답변에 현재 선택한 텍스트를 변경하는 코드가 있습니다.

글꼴을 courier new, 10포인트, 굵은 검은색으로 변경하려면 두 번째 링크에서 파생된 이 매크로를 사용하고 있습니다.

Sub ChangeSelectedFontToCode()
 Dim msg As Outlook.MailItem
 Dim insp As Outlook.Inspector

 Set insp = Application.ActiveInspector

 If insp.CurrentItem.Class = olMail Then
     Set msg = insp.CurrentItem

     If insp.EditorType = olEditorHTML Then ' outlook 2003
         Set hed = msg.GetInspector.HTMLEditor
         Set rng = hed.Selection.createRange
         rng.pasteHTML "<b><font style='color: black; font-size: 10pt; font-family:Courier New;'>" & rng.Text & "</font></b>"
     End If

     If insp.EditorType = olEditorWord Then ' outlook 2013
         Set hed = msg.GetInspector.WordEditor
         Set appWord = hed.Application
         Set rng = appWord.Selection
         rng.Font.Size = 10
         rng.Font.Color = wdColorBlack
         rng.Font.Bold = True
         rng.Font.Name = "Courier New"

         rng.Collapse Direction:=wdCollapseEnd
     End If

 End If

 Set appWord = Nothing
 Set insp = Nothing
 Set rng = Nothing
 Set hed = Nothing
 Set msg = Nothing

 End Sub

관련 정보