none
Outlook Rules RRS feed

  • Question

  • I recently switched to a new software that alerts us of email submissions. I have lots of Outlook rules but it seems the formatting of the new system is the problem. The information comes across inside of a table and Outlook cannot read the text inside the table. My research has lead me to believe that a script to convert this to a Plain Text email to be read by the rule is the best way to accomplish this. The solution I've found in TechNet is:

    Sub CovertRTFtoPlain(Item As Outlook.MailItem)
     Item.BodyFormat = olFormatPlain
     If InStr(1, Item.Body, "TEXTTOSEARCHBODYFOR") > 0 Then
     objMail.Move Session.GetDefaultFolder(olFolderInbox).Folders("FOLDERTOMOVEMESSAGETO")
     End If
     End Sub

    The script is supposed to convert to the message to Plain Text and move it to the appropriate folder and somehow not alter the original email. This seems to convert to Plain Text and make the email hard to read, but a second rule (not a script) is able to easily find the text in the body and move the message to the correct folder.

    Is there a better way in Outlook 2016 to get a rule to read a text string inside of a table, or even a better way to write the script so it doesn't mangle the HTML formatting and also moves the message to correct folder?

    Thanks!

    Thursday, January 3, 2019 9:17 PM

All replies

  • Hi fuzbuster83,

    >>  The information comes across inside of a table and Outlook cannot read the text inside the table.

    Is this table inserted via Insert > Table?

    If this is the case, the text in the table is able to be identifited in the inbox rule according to my test.

    Did I misunderstand anything? 

    Regards,

    Yuki Sun


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.

    Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.

    Monday, January 7, 2019 2:09 PM
    Moderator