Public WithEvents myOlItems As Outlook.Items
Private Sub Application_Quit()
Set myOlItems = Nothing
End Sub
Private Sub Application_Startup()
Set myOlItems = Application.GetNamespace("MAPI").GetDefaultFolder(olFolderInbox).Items
End Sub
' Converts incoming messages from plain text to HTML because they
' seem to right align as plain text.
Private Sub myOlItems_ItemAdd(ByVal Item As Object)
Dim mi As Outlook.MailItem
If Item.Class = olMail Then
Set mi = Item
If mi.BodyFormat = olFormatPlain Then
mi.BodyFormat = olFormatHTML
mi.Save
End If
End If
End Sub