PowerPoint the database (!)

G

Guest

I'm scanning/scraping a pile of PowerPoint presentations that are in an agreed-upon format and pulling in textual data from these files to be used elsewhere

At the moment, I'm tagging the various shapes I want to extract (all text boxes, all in bulleted list format) by setting the alternative text of the shape to a specific value. That way, I know text box A goes here, text box B goes there, etc

This is fine, but involves someone going through and tagging the existing presentations (we can set the tags up on the template for the future, but there's still a pile to deal with now)

Is there another property that I might be able to exploit that does NOT require additional handiwork? For example, all of the fields I want are in specific locations on the slide, and they're not so close together such that I'd need a real tight range. I was thinking that I could pick up the text box with upper left hand corner in the general area of x=10, y=40 or some such and know that it was field A, etc., but I can't see any such property

The fields I want are all text boxes, but there are many other text boxes, so that's out. The data is all bulleted, but I need to know which one is which, so using that alone won't work

All suggestions welcome (including "be satisfied with what you got"

Regards

Bret
 
B

Bill Foley

You can insert this macro into your presentation and check out the various
objects' names assigned by PowerPoint. To use, select a shape (Textbox),
click "Tools", "Macro", "Macros", select the NameShape" macro and click
"Run". You could put this on a toolbar for easy access as well. You can
also enter another name for the object and press "ENTER" to accept the new
name.

====Code Starts Here====

Sub NameShape()
Dim Name$
On Error GoTo AbortNameShape

If ActiveWindow.Selection.ShapeRange.Count = 0 Then
MsgBox "No Shapes Selected"
Exit Sub
End If
Name$ = ActiveWindow.Selection.ShapeRange(1).Name

Name$ = InputBox$("Give this shape a name", "Shape Name", Name$)

If Name$ <> "" Then
ActiveWindow.Selection.ShapeRange(1).Name = Name$
End If
Exit Sub

AbortNameShape:
MsgBox "No Shapes Selected"

End Sub

====Code Ends Here====

--
Bill Foley, Microsoft MVP (PowerPoint)
www.pttinc.com
Check out PPT FAQs at: http://www.rdpslides.com/pptfaq/


Bret said:
I'm scanning/scraping a pile of PowerPoint presentations that are in an
agreed-upon format and pulling in textual data from these files to be used
elsewhere.
At the moment, I'm tagging the various shapes I want to extract (all text
boxes, all in bulleted list format) by setting the alternative text of the
shape to a specific value. That way, I know text box A goes here, text box B
goes there, etc.
This is fine, but involves someone going through and tagging the existing
presentations (we can set the tags up on the template for the future, but
there's still a pile to deal with now).
Is there another property that I might be able to exploit that does NOT
require additional handiwork? For example, all of the fields I want are in
specific locations on the slide, and they're not so close together such that
I'd need a real tight range. I was thinking that I could pick up the text
box with upper left hand corner in the general area of x=10, y=40 or some
such and know that it was field A, etc., but I can't see any such property.
The fields I want are all text boxes, but there are many other text boxes,
so that's out. The data is all bulleted, but I need to know which one is
which, so using that alone won't work.
 
J

John Langhans [MSFT]

[CRITICAL UPDATE - Anyone using Office 2003 should install the critical
update as soon as possible. From PowerPoint, choose "Help -> Check for
Updates".]

Hello,

If none of the suggestions provided give you the functionality that you
were looking for or, if you (or anyone else reading this message) have
suggestions for how and why you think PowerPoint should provide this
functionality (or make it easier), don't forget to send your feedback (in
YOUR OWN WORDS, please) to Microsoft at:

http://register.microsoft.com/mswish/suggestion.asp

As with all product suggestions, it's important that you not just state
your wish but also WHY it is important to you that your product suggestion
be implemented by Microsoft. Microsoft receives thousands of product
suggestions every day and we read each one but, in any given product
development cycle, there are only sufficient resources to address the ones
that are most important to our customers so take the extra time to state
your case as clearly and completely as possible.

IMPORTANT: Each submission should be a single suggestion (not a list of
suggestions).

John Langhans
Microsoft Corporation
Supportability Program Manager
Microsoft Office PowerPoint for Windows
Microsoft Office Picture Manager for Windows

For FAQ's, highlights and top issues, visit the Microsoft PowerPoint
support center at: http://support.microsoft.com/default.aspx?pr=ppt
Search the Microsoft Knowledge Base at:
http://support.microsoft.com/default.aspx?pr=kbhowto

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of any included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
 
S

Steve Rindsberg

Is there another property that I might be able to exploit that does NOT
require additional handiwork? For example, all of the fields I want are in
specific locations on the slide, and they're not so close together such that I'd
need a real tight range. I was thinking that I could pick up the text box with
upper left hand corner in the general area of x=10, y=40 or some such and know
that it was field A, etc., but I can't see any such property.

The shape's .Left and .Top properties would do this, if getting the shape (ie
text box) coordinates is enough. If you need the coords of specific text within
the text box, then .BoundXXX is more useful
 

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