Beefy Boxes and Bandwidth Generously Provided by pair Networks Joe
No such thing as a small change
 
PerlMonks  

digging through outlook??

by ddrumguy (Acolyte)
on Mar 11, 2002 at 14:34 UTC ( [id://150946]=perlquestion: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.

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

Just curious has anyone ever written a script to go through an outlook folder and then take the emails and put them in an excel spreadsheet by date,time,subject and body. i need to do this and I am not sure how to accomplish it thanks for any advice Bob

Replies are listed 'Best First'.
Re: digging through outlook??
by patgas (Friar) on Mar 11, 2002 at 15:09 UTC

    Start off by looking at Win32::OLE. I was able to write plenty of stuff that dealt with Outlook and/or Excel just using that module and looking at the documentation for those programs.

    So, to answer your question, yes. :)

    "We're experiencing some Godzilla-related turbulence..."

Re: digging through outlook??
by cacharbe (Curate) on Mar 11, 2002 at 15:15 UTC
    Not specifically. A large number of different code examples exist here on this site, and I would hate to do ALL of your work for you, but I'll try and give you a couple hints:
    use strict; use Win32::OLE qw(in with); use Win32::OLE::Const 'Microsoft Outlook'; $|++; $Win32::OLE::Warn = 3; # Fail on errors my $OL = Win32::OLE->GetActiveObject('Outlook.Application') || Win32::OLE->new('Outlook.Application', 'Quit'); my $NameSpace = $OL->GetNameSpace("MAPI"); my $Folder = $NameSpace->GetDefaultFolder(olFolderInbox); foreach my $msg (in $Folder->{Items}){ ##Do something with them. }
    and for a wonderful tutorial on using excel (in the works), feel free to give my scratch pad a once over (or two or three times even).

    The OLE Object Viewer that ships with AS will also be VERY helpful to you. I found the file : c:\perl\html\site\win32\ole\browser

    C-.

      thank you ,thank you , thank you !!!!!!!
Re: digging through outlook??
by steves (Curate) on Mar 11, 2002 at 17:43 UTC

    Depending on how your mail is set up, you may also want to take a look at either Mail::IMAPClient or Mail::POP3Client. I've used IMAP several times here at work to pull mail from folders and put it somewhere else.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://150946]
Approved by root
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.