Thread Email als ungelesen markieren (17 answers)
Opened by havi at 2005-10-14 13:06

jan
 2005-10-14 14:22
#58820 #58820
User since
2003-08-04
2536 Artikel
ModeratorIn
[Homepage] [default_avatar]
Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
use strict;
use warnings;
use Win32::OLE::Const 'Microsoft Outlook';
use Win32::OLE 'in';
#Code for Outlook 97
my $FolderName = "my shared folder";
my $strValidUser = "~ DSM Requests"; #mailbox name/alias
my $Outlook = Win32::OLE->GetActiveObject("Outlook.Application");

unless(defined($Outlook)){
die("Unable to obtain Outlook OLE handle $!\n");
}
my $objNS = $Outlook->GetNamespace("MAPI");
my $objRecipient = $objNS->CreateRecipient($strValidUser);
$objRecipient->Resolve(); #You should check this!

my $objInbox = $objNS->GetSharedDefaultFolder($objRecipient, olFolder
+Inbox);
my $objFolder = $objInbox->Folders($FolderName);
foreach my $email (in $objFolder->Items ){
if ($email->{UnRead} == 0) {
#blah blah
}


alt, aber vielleicht ein anfang.
von: http://www.perlmonks.org/?node=383597
gefunden durch http://www.google.de/search?q=Win32%3A%3AOLE+mark+mail+unread

View full thread Email als ungelesen markieren