Good day! There is such a macro, which allows all the selected text to turn into 14 Times New Roman in black. I would like to modify it so that he himself automatically selected the text of the letter, formatted it, and also emphasized the right words in red. Where can I read and are there any ready-made lines of code? Thanks in advance!

Dim objItem As Object Dim objInsp As Outlook.Inspector Dim objWord As Word.Application Dim objDoc As Word.Document Dim objSel As Word.Selection On Error Resume Next Set objItem = Application.ActiveInspector.CurrentItem If Not objItem Is Nothing Then If objItem.Class = olMail Then Set objInsp = objItem.GetInspector If objInsp.EditorType = olEditorWord Then Set objDoc = objInsp.WordEditor Set objWord = objDoc.Application Set objSel = objWord.Selection With objSel .Font.Color = wdColorBlack .Font.Size = 14 .Font.Name = "Times New Roman" End With End If End If End If Set objItem = Nothing Set objWord = Nothing Set objSel = Nothing Set objInsp = Nothing 
  • Vague task setting. For example: at what point do you plan to run a macro? When did you type the whole letter? What is the formatting of the letter (what are the formatting options? Font? Indents? Alignment?)? How are you going to define the right words to underline in red? How does this "red" look like? Bring to start a letter before the macro starts, and then after. - Roman Sidorin

0