I currently have a script that goes through a whole folder I specify in my Outlook Mailbox to read the senders email, fullname, time and body of each email.
Works great no issues, but is it possible that I can use a 'wscript argument' to drop one email file on the script to then display it for me?
How would I do it? I cant work out a step by step process in my head to complete this?
the start of my script is like this...
Set objOutlook = CreateObject("Outlook.Application")
Set objNameSpace = objOutlook.GetNameSpace("MAPI")
Do I have to change this to something or would it not be needed as its from a random mailbox\folder?
Set objFolder = objNameSpace.Folders("Mailbox - Pavle Stojanovic").Folders("Inbox").Folders("Test")
Set colItems = objFolder.items
' -------------------------------------------------
For Each item in colItems
' Get email data and display how I need it to be......
Next