Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^2: Win32::PowerPoint Extension for Lines and Shapes (updated)

by nzsvz9 (Sexton)
on Mar 07, 2021 at 18:16 UTC ( [id://11129288]=note: print w/replies, xml ) Need Help??


in reply to Re: Win32::PowerPoint Extension for Lines and Shapes (updated)
in thread Win32::PowerPoint Extension for Lines and Shapes

Thanks huakex - the color thing worked great. It gives me the syntax and approach I need to get more things to work (like line thickness and so on). There is already in the Win32::PowerPoint::Utils a subroutine for RGB .. so I'll try to use that.

However, I'm struggling with the shape still. There is a module for Win32::PowerPoint::Const - but it does not include all the msoShape* items I want to use. In the constants module there are some definitions (I think Microsoft calls them Enumerations - MsoAutoShapeType enumeration (Office) - but whatever) but none for the shapes:

# msoPatternType msoPattern10Percent => 2, msoPattern20Percent => 3, msoPattern25Percent => 4,
So I'm going to try to extend that module to include the definitions I found in MSDN for the shapes like this:
# msoAutoShapeType msoShapeRectangle => 1, msoShapeParallelogram => 2, msoShapeTrapezoid => 3,
And use them ... as the Win32::OLE::Const->Load('Microsoft Office 12.0 Object Library'); I could not determine which Office to load as I've got 365 from work and the documentation is poor. Why Microsoft has to be so obtuse about everything is beyond me, but I digress.

Thanks for your help. It's appreciated. If anyone else has any ideas - please add them - always welcome!!!

One more thing ... after I add these other functions, I want to update the original Win32::PowerPoint module (and sub modules) back in CPAN as opposed to adding a new module cloned and forked from the original - so any pointers on how to start down that path would be very helpful.

Replies are listed 'Best First'.
Re^3: Win32::PowerPoint Extension for Lines and Shapes
by haukex (Archbishop) on Mar 07, 2021 at 20:43 UTC
    Win32::OLE::Const->Load('Microsoft Office 12.0 Object Library'); I could not determine which Office to load

    Yes, that's a little tricky; I actually had to check the registry at HKEY_CLASSES_ROOT\Typelib to figure that out for my machine. There's probably a way to get that information programmatically (I do see some code in Win32::OLE::Const relating to TypeLib), but unfortunately I'm not an expert on that.

    So I'm going to try to extend that module to include the definitions I found in MSDN for the shapes

    You can certainly try doing that, although I thought you said in the root node it didn't work when you tried your own numeric constants? If it were me, I'd first expend some energy trying to see if I can get the constants from the TypeLib before hardcoding my own constants.

    I want to update the original Win32::PowerPoint module (and sub modules) back in CPAN as opposed to adding a new module cloned and forked from the original - so any pointers on how to start down that path would be very helpful.

    The first step is to get in touch with the author of Win32::PowerPoint, for example by filing a pull request with your modification suggestions. If for whatever reason there is a disagreement about adding your features into the distribution, instead of forking, you can design your module as an add-on; since the module is OO, you should be able to create a subclass, and then release that as a distribution to CPAN. If for some reason the author is unresponsive, see How do I go about maintaining a module when the author is unresponsive?.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (2)
As of 2024-04-19 18:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found