Re: PowerPoint applescript for shape type free form
Re: PowerPoint applescript for shape type free form
- Subject: Re: PowerPoint applescript for shape type free form
- From: Paul Berkowitz <email@hidden>
- Date: Fri, 16 May 2008 15:27:53 -0700
- Thread-topic: PowerPoint applescript for shape type free form
I already explained that 'shape type free form' is an enumeration, not a
class, and there are no properties you can get for it. So if 'left
position', 'top', 'width' and 'height' aren't good enough for what you need,
the answer is "Sorry, you can't get what you want".
Since in 2008 12.1.0 you can now get the selection and specify which shape
of the selection via 'shape range', I'd suggest that you do that, copy it to
clipboard, paste into some other compatible and scriptable application that
does have the functions you're looking for, and get your data there. If you
can.
At microsoft.public.mac.office.powerpoint, the only person with AppleScript
knowledge you're likely to get (and less frequently than right here) is me.
If you go to the non-Mac powerpoint MS newsgroup you can ask for VBA Help,
which you could use in PPT 2004 but not 2008. Just possibly it can be done
there, but I wouldn't be overly optimistic. These newsgroups are just manned
by knowledgeable users, not by Microsoft itself.
--
Paul Berkowitz
> From: Tracy Lakin <email@hidden>
> Date: Fri, 16 May 2008 13:46:01 -0700
> To: <email@hidden>
> Subject: Re: PowerPoint applescript for shape type free form
>
> Hi,
>
> Thanks for the response, but no, not what I need.
>
> Just getting the shape object of type free form is not enough. I need the
> data that defines the line. In the case of 'line shape' the data is in the
> properties, the X,Y pairs. In the free form case, I can find no access to
> how the line is defined - the point data that makes the line. That is, a
> line is a series of points, so that data must be somewhere. The size and
> position are useful, but do not describe the line.
>
> I need to be able to recreate the line outside of PowerPoint. Also I need to
> make a new free form line in PowerPoint from point data generated from
> outside of PowerPoint. Neither of these appears possible as I find no
> properties to hold the point data, no way to fully define the line.
>
> I was thinking that the free form case is just a bunch of 'line shape'
> objects strung together, as a shape can contain a line shape. But asking the
> free form shape for all its line shapes comes up empty (which makes sense,
> I'm just trying things to see what happens).
>
> I'm now thinking of trying to hack the clipboard data for a free form line,
> as the points must be there. Then I can copy and paste, with basically the
> same results.
>
> I'm also very wary of the 12.1.0 upgrade as so many folks are having issues.
> It's a bit moot since I have to work with Office 2004 as well as 2008.
>
> It's been many years since I did any Applescripting, so I'm hoping I'm just
> missing something obvious.
>
> How do you ask Microsoft this kind of technical question? On the news group
> microsoft.public.mac.office.powerpoint? What is the direct way to ask?
> (hopefully without paying for support).
>
> Thanks for reading this,
> Tracy
>
>
>> On 5/15/08 8:39 PM, "Tracy Lakin" <email@hidden> wrote:
>>
>>> Hi All,
>>>
>>> I¹m needing to get objects, in particular the curve / freeform / scribble
>>> lines, into and out of PowerPoint (2004 or 2008). I can get any ³shape type
>>> free form² objects on a slide, but I can¹t find where the point data is
>>> stored.
>>>
>>> Line Shapes have a beginning and end x,y pair. What do the free form shape
>>> types use?
>>>
>>> Is there a relation between free form type shapes and line shapes that I¹m
>>> not
>>> seeing? That is, do free form shape types have line shapes in them? I don¹t
>>> find any.
>>>
>>> Thanks for any help,
>>> Tracy
>>>
>>
>> 'line shape' is a proper class a specific subclass of 'shape' - with many
>> properties including those 'begin line X', 'begin line Y' properties you
>> mention. There are a few other subclasses of shape (e.g. connector, picture,
>> place holder, etc.) which have their own specialized properties. 'shape'
>> itself (so all varieties of 'shape') have 'left position', 'top', 'width'
>> and 'height' properties. Also 'rotation'. Are those not enough to get what
>> you need? Check them out - they can be set as well as got. 'shape type free
>> form' etc. is just one of the enumerated values for 'shape type' property of
>> shape. It's not a class - it has no properties. You can't do anything with
>> it as such.
>>
>> The big - very big - news is that in the brand new 12.1.0 upgrade of
>> PowerPoint (and other MS Office apps) that was released yesterday, you can
>> now get 'selection' with 'shape range' and 'slide range' properties (classes
>> in their own right). If 'left position', 'top', 'width' and 'height' of
>> shape still doesn't get you what you're looking for, see if the same
>> properties of 'shape range of selection' helps.
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> AppleScript-Users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> Archives: http://lists.apple.com/archives/applescript-users
>
> This email sent to email@hidden
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden