Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

OLE syntax question

by zuma53 (Beadle)
on Aug 26, 2014 at 19:31 UTC ( [id://1098657]=perlquestion: print w/replies, xml ) Need Help??

zuma53 has asked for the wisdom of the Perl Monks concerning the following question:

Hi--

I'm trying to use Perl to process some Outlook messages, but I need to insure they are done in date-received order. I saw this posting to do it in VB (http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+WinBatch/OLE~COM~ADO~CDO~ADSI~LDAP/OLE~and~Outlook+Sort~Email~by~Received~Time.txt), but can't seem to get the syntax quite right:

VB:  objItems.Sort("[ReceivedTime]", @True);

How do I express the <"ReceivedTime"> and <@True> parameters in Perl?

Perl:  $objItems->Sort{???, ???};

I'm not a whiz with VB in the least.

Thanks in advance.

Replies are listed 'Best First'.
Re: OLE syntax question
by Corion (Patriarch) on Aug 26, 2014 at 19:43 UTC

    Your Perl syntax is highly unlikely to work, or even compile.

    Most likely you want

    $objItems->Sort( "[ReceivedTime]", 1 );

    If the function really, really wants a VT_BOOLEAN as its second parameter, you will have to create the appropriate Win32::OLE::Variant object.

      Works like a charm!

      Thanks!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1098657]
Approved by AppleFritter
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2024-04-20 02:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found