Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting current slide title in PowerPoint 2004




On 29 Jan 2007, at 08:56, Nir Soffer wrote:

I'm trying to fetch the title from PowerPoint 2004 slide. It seems that there is no direct way to access the title, and you actually have to search through the shapes for a one of the title placeholders types, and get the text from its text frame. This search become slow if the slide contain many shapes.

[snip]

I wonder if anyone can come up with an easier and faster way to fetch the title?

IIRC, a slide's title (if it has one) is contained by the first placeholder in its placeholders list, Nir.


On that basis, I'd try something like:

----------------

tell application "Microsoft PowerPoint"

set titleTypes to {placeholder type title placeholder, ¬
placeholder type center title placeholder, ¬
placeholder type vertical title placeholder}

set currentSlide to slide of view of active window
(* or: set currentSlide to slide n of active presentation *)

tell currentSlide's first place holder to if placeholder type is in titleTypes then
set slideTitle to content of its text frame's text range
else
set slideTitle to missing value (* or whatever *)
end if

end tell


----------------

---
kai


_______________________________________________ Do not post admin requests to the list. They will be ignored. AppleScript-Users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/applescript-users/email@hidden Archives: http://lists.apple.com/mailman//archives/applescript-users

This email sent to email@hidden
References: 
 >Getting current slide title in PowerPoint 2004 (From: Nir Soffer <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.