S
Shaun Clowes
Hi All,
I'm having some trouble trying to set the properites of the MessageFilter
(http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cdo/html/_
olemsg_messagefilter_object.asp) object in a CDO messages collection using
Win32::OLE. Nothing I do seems to be able to change any of the properties. A
snippet of the code I'm trying:
print "We have a folder of type " . Win32::OLE->QueryObjectType($Folder) .
"\n";
print "The filter is of type " .
Win32::OLE->QueryObjectType($Folder->Messages->Filter) . "\n";
print "Currently filtering for size " . $Folder->Messages->Filter->Size .
"\n";
$Folder->{"Messages"}->{"Filter"}->{"Size"} = 12;
print "Currently filtering for size " . $Folder->Messages->Filter->Size .
"\n";
$Folder->Messages->Filter->LetProperty('Size', 12);
print "Currently filtering for size " . $Folder->Messages->Filter->Size .
"\n";
$Folder->Messages->Filter->SetProperty('Size', 12);
print "Currently filtering for size " . $Folder->Messages->Filter->Size .
"\n";
The output without -w:
We have a folder of type Folder
The filter is of type MessageFilter
Currently filtering for size
Currently filtering for size
Currently filtering for size
Currently filtering for size
The output with -w:
The filter is of type MessageFilter
OLE exception from "Collaboration Data Objects":
[Collaboration Data Objects - [MAPI_E_NOT_FOUND(8004010F)]]
Win32::OLE(0.17) error 0x8004010f
in METHOD/PROPERTYGET "Size" at AssignPrNumbers.pl line 65
Use of uninitialized value in concatenation (.) or string at
AssignPrNumbers.pl
line 65.
Currently filtering for size
OLE exception from "Collaboration Data Objects":
[Collaboration Data Objects - [MAPI_E_NOT_FOUND(8004010F)]]
Win32::OLE(0.17) error 0x8004010f
in METHOD/PROPERTYGET "Size" at AssignPrNumbers.pl line 67
Use of uninitialized value in concatenation (.) or string at
AssignPrNumbers.pl
line 67.
Currently filtering for size
OLE exception from "Collaboration Data Objects":
[Collaboration Data Objects - [MAPI_E_NOT_FOUND(8004010F)]]
Win32::OLE(0.17) error 0x8004010f
in METHOD/PROPERTYGET "Size" at AssignPrNumbers.pl line 69
Use of uninitialized value in concatenation (.) or string at
AssignPrNumbers.pl
line 69.
Currently filtering for size
OLE exception from "Collaboration Data Objects":
[Collaboration Data Objects - [MAPI_E_NOT_FOUND(8004010F)]]
Win32::OLE(0.17) error 0x8004010f
in METHOD/PROPERTYGET "Size" at AssignPrNumbers.pl line 71
Use of uninitialized value in concatenation (.) or string at
AssignPrNumbers.pl
line 71.
Currently filtering for size
Anyone have any ideas what I'm doing wrong?
Thanks,
Shaun
I'm having some trouble trying to set the properites of the MessageFilter
(http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cdo/html/_
olemsg_messagefilter_object.asp) object in a CDO messages collection using
Win32::OLE. Nothing I do seems to be able to change any of the properties. A
snippet of the code I'm trying:
print "We have a folder of type " . Win32::OLE->QueryObjectType($Folder) .
"\n";
print "The filter is of type " .
Win32::OLE->QueryObjectType($Folder->Messages->Filter) . "\n";
print "Currently filtering for size " . $Folder->Messages->Filter->Size .
"\n";
$Folder->{"Messages"}->{"Filter"}->{"Size"} = 12;
print "Currently filtering for size " . $Folder->Messages->Filter->Size .
"\n";
$Folder->Messages->Filter->LetProperty('Size', 12);
print "Currently filtering for size " . $Folder->Messages->Filter->Size .
"\n";
$Folder->Messages->Filter->SetProperty('Size', 12);
print "Currently filtering for size " . $Folder->Messages->Filter->Size .
"\n";
The output without -w:
We have a folder of type Folder
The filter is of type MessageFilter
Currently filtering for size
Currently filtering for size
Currently filtering for size
Currently filtering for size
The output with -w:
The filter is of type MessageFilter
OLE exception from "Collaboration Data Objects":
[Collaboration Data Objects - [MAPI_E_NOT_FOUND(8004010F)]]
Win32::OLE(0.17) error 0x8004010f
in METHOD/PROPERTYGET "Size" at AssignPrNumbers.pl line 65
Use of uninitialized value in concatenation (.) or string at
AssignPrNumbers.pl
line 65.
Currently filtering for size
OLE exception from "Collaboration Data Objects":
[Collaboration Data Objects - [MAPI_E_NOT_FOUND(8004010F)]]
Win32::OLE(0.17) error 0x8004010f
in METHOD/PROPERTYGET "Size" at AssignPrNumbers.pl line 67
Use of uninitialized value in concatenation (.) or string at
AssignPrNumbers.pl
line 67.
Currently filtering for size
OLE exception from "Collaboration Data Objects":
[Collaboration Data Objects - [MAPI_E_NOT_FOUND(8004010F)]]
Win32::OLE(0.17) error 0x8004010f
in METHOD/PROPERTYGET "Size" at AssignPrNumbers.pl line 69
Use of uninitialized value in concatenation (.) or string at
AssignPrNumbers.pl
line 69.
Currently filtering for size
OLE exception from "Collaboration Data Objects":
[Collaboration Data Objects - [MAPI_E_NOT_FOUND(8004010F)]]
Win32::OLE(0.17) error 0x8004010f
in METHOD/PROPERTYGET "Size" at AssignPrNumbers.pl line 71
Use of uninitialized value in concatenation (.) or string at
AssignPrNumbers.pl
line 71.
Currently filtering for size
Anyone have any ideas what I'm doing wrong?
Thanks,
Shaun