I have, I hesitate somewhat to admit, written some similar code myself (hesitation due to general dislike of MSFT APIs), so I will try to answer, though I don't have a Windows box here to verify the code on.
If Outlook is already running, this code will work without any username or poassword prompts. If not, running the program will cause Outlook to automagically start and present the username/password prompt in its ordinary way.
The line you quote creates a new instance of an object that one uses, through OLE, to interact with Outlook programmatically. It will indeed start Outlook for you if it is not already running.
The rest of the code is just the usual code for opening a mailbox in Outlook. The strange method and argument names are simply a reflection of the way MAPI data sources are structured. You can find a VB equivalent of that code fairly easily by searching around the 'net, though Perl is a less common choice for this sort of thing (but I presume it works fine).
In reply to Re^3: How to find when a new email arrives in my mailbox (outlook)
by Errto
in thread How to find when a new email arrives in my mailbox (outlook)
by gpurusho
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |