Embedding hidden data in a slide using Applescript

E

ecrichlow

I'm in the process of creating a new solution to replace the VBA
AddIn we've been distributing for a few years now.

With VBA, I could add tags to a shape (picture) that I placed on a
slide, and those tags could contain strings of data that I later
retrieve when the slideshow runs.

The Applescript dictionary for PowerPoint doesn't expose a tags
collection. So now I'm left looking for a way to embed hidden data
either on the slide or on the shape. There is a "comments" element in
the shape object, but so far I haven't figured out how to add comments
to a shape in Applescript. Perhaps I just don't have the syntax right.
Even then, I don't know if comments attached to a shape get displayed
when the presentation runs.

Anybody got any suggestions?

....Thanx...
....Eric Crichlow...
....Interwrite Learning...
 
S

Steve Rindsberg

I'm in the process of creating a new solution to replace the VBA
AddIn we've been distributing for a few years now.

With VBA, I could add tags to a shape (picture) that I placed on a
slide, and those tags could contain strings of data that I later
retrieve when the slideshow runs.

The Applescript dictionary for PowerPoint doesn't expose a tags
collection. So now I'm left looking for a way to embed hidden data
either on the slide or on the shape. There is a "comments" element in
the shape object, but so far I haven't figured out how to add comments
to a shape in Applescript. Perhaps I just don't have the syntax right.
Even then, I don't know if comments attached to a shape get displayed
when the presentation runs.

Anybody got any suggestions?

Comments may not be the way to go, as they're not necessarily hidden from the
user.

Adding them, though, is akin to adding any other type of shape. Here's a
snippet of VBA that assumes you've got a reference to the slide in oSl and some
variables set to the top, left, text etc. you want to include in the comment:

With oSl.Shapes.AddComment(oCom.Left, oCom.Top)
.TextFrame.TextRange.Text = oCom.Author & " " & oCom.DateTime _
& vbCrLf _
& oCom.Text

For help translating that to AppleScript, I'd see if a copy of Paul Berkowitz'
superb article on the subject is still available from MacTech magazine.

If you don't have to store much information, custom document properties are
another possibility, but I'd use those ONLY if your info needs are very light.
Stuffing too much data into doc props can cause links in the presentation to go
south.

================================================
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top