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

Hi Monks,

First question here... Feeling a bit nervous...

I'm quite used to OLE and made a lot of work in MS Office in the last year with it.

I now want to develop an Outlook add-in. To do so, one needs the .net (which I refuse) or go for VB which drives me crazy (if a least I never tried Perl... choice would be simplier...). If I uderstood well, the target is to have a dll and make Outlook recognize it as an add-in.

I would like to stick with Perl.

Can you tell me how to do it, would this be possible. Any success story, link, tuto, ... is welcome.

Many thanks in advance,

Pierre.

Replies are listed 'Best First'.
Re: Outlook add-in using Perl code
by liverpole (Monsignor) on Dec 06, 2006 at 00:56 UTC
    Hi zorglups,

    No worries; and nothing to be nervous about ... you're amongst friends!

    While I may not be able to give you as much help with your question as I'd like, I can tell you that I'm investigating a very similar problem at work, in which it is necessary to call a Perl script from Outlook.  The intent is to be able to send a remote message to my Outlook mailbox, have a a macro parse the subject, and (if the subject contains the right keywords) have it call the Perl script, which would then take control of sending messages across a socket to a build machine, at which point it would initiate a software build.

    I've been able to get all the way to the point where the VB macro does the right thing on the right kind of message, but getting it to call the Perl script has been problematic.  In the searches I've done on the Internet, I came across PerlCom, which is a component provided with ActiveState's PDK (Perl Development Kit):

    PerlCOM is an ActiveX Component that allows you to easily embed Perl Interpreters into client applications. You can add Perl subroutines to your applications, use Perl packages and classes, and exchange data freely between the host languages and Perl. Now you can embed Perl in any development environment that supports ActiveX components.

    Is that, perhaps, the kind of thing you're looking for?  If so, check out ActiveState's site, and specifically this link to their PDK.

    I'm sure your knowledge of Windows is much more extensive than mine, so this may or may not be useful to you.  But perhaps it will at least be a start in the right direction.  It may be that creating COM objects even allows you to completely bypass VB.

    And welcome to Perlmonks!


    s''(q.S:$/9=(T1';s;(..)(..);$..=substr+crypt($1,$2),2,3;eg;print$..$/
Re: Outlook add-in using Perl code
by loris (Hermit) on Dec 06, 2006 at 09:05 UTC

    Welcome zorglups,

    I asked a similar question recently. Maybe some of the answers I received will be of use to you.

    BTW, I hope the calm, meditative atmosphere of the Monastery is having a soothing effect on your nerves.

    loris


    "It took Loris ten minutes to eat a satsuma . . . twenty minutes to get from one end of his branch to the other . . . and an hour to scratch his bottom. But Slow Loris didn't care. He had a secret . . ." (from "Slow Loris" by Alexis Deacon)
      Thanks Loris, Sorry for the late reaction but I've been out for a while. If I find a way, I will write down a concrete example. Pierre.
Re: Outlook add-in using Perl code
by Tabari (Monk) on Dec 06, 2006 at 10:26 UTC
    Hello I did not try it myself, but you could try encapsulating perl in a COM object. In Perl in C# , several replies offer info on how to do this