Re: Getting current slide title in PowerPoint 2004
Re: Getting current slide title in PowerPoint 2004
- Subject: Re: Getting current slide title in PowerPoint 2004
- From: kai <email@hidden>
- Date: Mon, 29 Jan 2007 13:30:40 +0000
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:
Archives: http://lists.apple.com/mailman//archives/applescript-users
This email sent to email@hidden