Hi Outlook VBA Experts: I apologize for everything being in one sentence, but I am unable to get the forum to recognize line breaks. I posted a separate question about this, with no resolution so far, so I am going ahead with my real purpose for being on the forum. In Outlook 2007, I have a VBA script that is used in a rule that runs on all messages when they arrive. It works fine on normal messages (MailItem), but is not even invoked on a report message (ReportItem). For example, let's say this is the script (the BB code tags work, but the four lines of code are run together...but I'm sure you can parse it...I've put in some extra spaces that will help):
And let's say the only action in the rule is "run a script" and it is the script above. Problem is, it doesn't run on report messages. How would I get a script like the above to run on report items as well as mail items? Please provide detailed instructions/code, as I'm a newbie to Outlook VBA (in fact, to all forms of VB). Thanks very much, Joe P.S. I apologize if this has already been addressed, but my searches in the forums turned up no hits.
Sub Display Subject (MyMail as MailItem) Dim strSubject = MyMail.Subject MsgBox strSubject End Sub