Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Re: win32::ole ppt regexp

by lhoffmeyer (Initiate)
on Jan 14, 2003 at 21:20 UTC ( #226958=note: print w/ replies, xml ) Need Help??


in reply to Re: win32::ole ppt regexp
in thread win32::ole ppt regexp

Yes, certainly I need the s///. Still doesn't work, though. It appears that no text is being captured to regexp. I changed script a bit but still is not working. No errors or messages but no output to print command either.

foreach my $shape (in $p2->Slides(4)->Shapes()){ if ($shape->{Type}==18){ my $text = $shape->TextFrame->TextRange; print "$text \n"; $shape =~s/members\=[0-9]{2,3}/members\=$b4r4/; } }


Comment on Re: Re: win32::ole ppt regexp
Download Code
Re: Re: Re: win32::ole ppt regexp
by MZSanford (Curate) on Jan 15, 2003 at 14:29 UTC
    A few thoughts ...

    • The regexp should probably be run against $text, not $shape.
    • you should not need the in in your foreach loop
    • You said the print is printing nothing ... are you seeing the new lines ? (maybe nothing = 18 ?)
    • Last time i worked with Power Point (a month or so ago), i resorted to using perl -d, putting a break at a line similar to your foreach, and then using Data::Dumper to poke around for the text box i needed (which ended up being $Presentation->Slides(1)->Shapes->Title->TextFrame->TextRange->{Text})

    from the frivolous to the serious

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://226958]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (8)
As of 2014-07-23 05:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (133 votes), past polls