Glorius Brothers and Sisters....
I'm working on a script that will allow Users to open and view an Outlook .msg file. MS Outlook and Outlook Express allow Users to to drag and drop an email to a directory and create a .msg file that contains the email and any attachments. The publishing company where I work has decided that this small file will form the basis of an ad tracking system, for better or worse. Currently the management of these files is completely manual. The current script will form part of a larger Perl App that will provide some automation and tracking.
I've tried using Win32::Process to open the file in Outlook Express but without luck. The sample code is below. I can launch OE fine, the file itself will not open however. It will open if I just double click the file sitting on the desktop it so I know OE is able to view it.
I've also tried Win32::OLE. Regrettably it's not working. The goal here is to simply open the .msg file for viewing in Outlook. I do not require data from the email itself.
Any thoughts or hints would be appreciated.
I am using ActiveState Perl 5.8.7 on Windows XP. The solution will have to work on both XP and Win2000.
#Win32::Process sample sub ViewEmail{ my $Path = "c:\\documents and settings\\p court\\desktop"; my $Outlook = "c:\\program files\\Outlook Express\\MSIMN.exe"; my $ProcessObj; my $file = "VolleyballBC"; if($Outlook){ chdir $Path; Win32::Process::Create( $ProcessObj, $Outlook, "MSIMN $file", 1, NORMAL_PRIORITY_CLASS, ".") || die ! "no can do"; } $ProcessObj->Suspend(); $ProcessObj->Resume(); }
In reply to Outlook Express & Perl by philc
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |