Hi, this macro is not working in Outlook
4605.jpg
Hi, this macro is not working in Outlook
4605.jpg
Welcome to VBAX ShUz. Have a look here to see if this helps you get some ideas. https://answers.microsoft.com/en-us/...c-68b599b31bf5
Remember To Do the Following....
Use [Code].... [/Code] tags when posting code to the thread.
Mark your thread as Solved if satisfied by using the Thread Tools options.
If posting the same issue to another forum please show the link
RGB(0, 255, 0) is not actually red colour but, that aside, try the following
Sub Red() 'Graham Mayor - https://www.gmayor.com - Last updated - 24 Jul 2023 Dim olItem As Object Dim olInsp As Object Dim wdDoc As Object Dim oRng As Object On Error Resume Next Select Case Outlook.Application.ActiveWindow.Class Case olInspector Set olItem = ActiveInspector.currentItem Case olExplorer Set olItem = Application.ActiveExplorer.Selection.Item(1) End Select With olItem Set olInsp = .GetInspector Set wdDoc = olInsp.WordEditor Set oRng = wdDoc.Application.Selection.Range oRng.Font.Color = RGB(255, 0, 0) End With lbl_Exit: Set olItem = Nothing Set olInsp = Nothing Set wdDoc = Nothing Set oRng = Nothing Exit Sub End Sub
Graham Mayor - MS MVP (Word) 2002-2019
Visit my web site for more programming tips and ready made processes
http://www.gmayor.com