Home > perl, powerpoint > Extract Text from PowerPoint using Perl – convert ppt to text

Extract Text from PowerPoint using Perl – convert ppt to text

I need to unleash this on the world. I’ve been working on a project where the goal is to integrate powerpoint slides into a flash presentation. All the ppt to swf products seem to convert the powerpoint slide into an image, maybe vector based, I’m not sure, but the end result is a swf and the text is not selectable.

The point is to automate the process of grabbing the text out of the original powerpoint deck to use for different purposes, search engine optimization, text search. I’m sure there’s an easy way to do this in VB or C#, but I’m a Perl native and became obsessed with Win32::OLE for the last 3 hours.

Here’s the breakdown:
The Problem: How do I get text out of the text boxes in a powerpoint presentation and into a text file?

1. First get yourself Win32::OLE for perl

2. Take a look at this roth consulting presentation. It took me a few reads to “get it”, and I think there are some inconsistencies in some of the examples.

3. Make yourself a powerpoint presentation. Just use the default text boxes. This script is highly experimental and I’ve only been playing with it on simple slides.

4. After several attempts at pasting code into this blog… i’ve given up. You can download the sample file: ppt-parse.txt PPT Parser

Basically, this is an exercise in Win32::OLE.

Advertisements
Categories: perl, powerpoint
  1. February 4, 2007 at 4:31 am

    Neat use of Perl. I’m a Perl programmer from many years ago but I have never used Windows’s Perl power in the form of the Win32 modules. Your script inspired me so I’ll take a look.

    Thanks for sharing :)

  2. andra
    September 21, 2011 at 11:09 pm

    hello i need to download PPT Parser.txt, please send me this PPT Parser.txt, thank’s for your help

  3. June 28, 2013 at 2:38 am

    Heya i am for the first time here. I found this board and I find It truly useful & it helped me out a lot.

    I hope to give something back and help others like
    you helped me.

  4. September 9, 2013 at 5:31 pm

    I know this is pretty old, but is ppt-parse.txt still being hosted? I can’t seem to grab it.

    Thanks!

  5. October 17, 2013 at 11:02 pm

    Hi there! Iknow this is kind of off topic but I
    was wondering if you knew where I could find a captcha plugin for myy comment form?
    I’m using the same blog platform as yours and I’m havijg difficulty finding one?
    Thanks a lot!

  1. January 30, 2008 at 5:11 pm

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: