The purpose of OLE is to allow an outside code base to interact with and control an OLE enabled (IDispatch derived) application.

The OLE interface has a client and a server. Your assumption is correct in that Perl code calling Win32::OLE and accessing an application does indeed create an instance of the application. The application can be on the local machine or remote, and it is the Server, while your code is the client, so it would be limited to opening IE and controlling it.

I have created OLE interfacing applications to automate many of the business processes I encounter. From autoformatting wordfiles, reading and aggregating data from from them based on a template, creating dynamic reports in excel from data mined from the web based on a template provided by the "customer" (all of my customers are internal). I've written apps to go through a series of public mail boxes and save off all the attachments, create slides in a PowerPoint presentation based on data I mined from the web (part of the excel application)...The list goes on and on.

I've also written COM components with this interface in mind so that others could transform XML documents through BizTalk and access MSMQ queues in an application specific manner using whatever programming language they preferred.

Really, anything that is done on a regular basis in any of these applications can be automated with the OLE interface. When you are writing in VBA for any of these applications, you are writing code directly against the OLE interface.

C-.


In reply to Re: Re:^4 Win32::OLE Examples? by cacharbe
in thread Win32::OLE Examples? by Flame

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.