obuf.blogg.se

Outlook conditional formatting multiple words
Outlook conditional formatting multiple words












'Grab the body of the message using a Word Document object. If myObject.MessageClass = "IPM.Note" And _ 'The active inspector is displaying a mail item.

outlook conditional formatting multiple words

I have this scenario working in Word 2013, and I have an example code set below that I have tried to modify from the existing to replicate this functionality in an Outlook email by referencing Microsoft Word 15.0 Object Library in the Visual Basic References Tool.

outlook conditional formatting multiple words

any word with "abctelephone" needs to be bolded and the abc changed to the corresponding brand's colour. Once it has been bolded, I don't want clicking the button again to increase the font size, so an "if bolded do nothing" is requiredĮ.g. The code needs to find a word that starts with the string "abc" and then reformats the entire word to bold and then changes the colour of the "abc" string to the correct brand's colour corresponding to the letters following the full word/product. I am trying to build a Macro VBA code to instantly find these words and change the formatting. We have certain branding formatting for our product names, but manually changing the colour and font style in every email across the company is time consuming.














Outlook conditional formatting multiple words