Problem . Manage incoming messages using vbscript.
Outlook Version : Outlook 2000
Description I can’t use VBA for this because, as I believe, Outlook 2000 does not allow you to run a VBA script from the rules wizard, and therefore, I must use the Run a Program | VBScript Run a Program | VBScript
What I know : I know how to handle emails from VBA, like this
Sub Sample(MyMail As MailItem) Dim strID As String, olNS As Outlook.NameSpace Dim olMail As Outlook.MailItem strID = MyMail.EntryID Set olNS = Application.GetNamespace("MAPI") Set olMail = olNS.GetItemFromID(strID) '~~> Rest of the code Set olMail = Nothing Set olNS = Nothing End Sub
I also know how to run vbscript by email, which is already in the inbox. To run vbscript on OL2000, you must use Run A Program and point it to the vbs file. Run A Script not available in OL2000.
What I do not know : And here I need help. How to get a mail object that didn’t hit the mailbox in VBS. As soon as I receive the object, I can perform the remaining necessary operations.
source share