VBA in Powerpoint

P

PSKelligan

Hello All!
I am trying to work with the "Tags Object" in powerpoint so that I can
manipilate
a presentation based on a tags namew and or value. What I wast to do is ...

1. Loop through all of the Shapes in a presentation so that I can add Tags
based on a value in the Slide Title.

2. Loop through each "msoEmbeddedOLEObject" in a presentation and Tag them
with a Tag name based on the Presentation's name.

3. Open the msoEmbeddedOLEObject with excel and manipulate the data by
adding formulas to a column in the spreadsheet.

I have been getting better with my codeing in Excel but this powerpoint
thing has got my in a brain-freeze. I have searched the web but there does
not seem to be much out there to help me (or I do not know enough to put the
right search arguments in.)
Any help would be greatly appreciated! Thanks
 
P

PSKelligan

Hi steve,

Thanks for the fast response. Here is one of the code samples I pulled
from the net. I cannot even get it to count all shapes in a presentation let
alone ditinctly the msoEmbeddedOLEObjects in the presentation. As far as
basing the Tag Name/values on shape or objectcontent or file names, I frankly
do not know where to begin.

Code Follows:

Sub TagShapes()

Dim oSl As Slide
Dim oSlObject As Object
Dim oSlides As Slides
Dim oCom As Object
Dim i As Long

Set oSlides = ActivePresentation.Slides

' Test message to see if my syntax is working
MsgBox "There are " & Shapes.Count & " In this Presentation"

For Each oSl In oSlides
Set oSlObject = oSl
For i = 1 To .Shape.Count
With oSl.Shapes.Item(i).Tags
.Add "TEST_TAG_NAME", "YadaYadaYada"
End With
Next
Next oSl

End Sub

Thanks again for the response.

Regards,
Patrick
 
H

Hans W. Hofmann

On Mon, 11 Apr 2005 08:34:01 -0700, "PSKelligan"

Hi,
8<-----------

Code Follows: Syntax Errors removed...

Sub TagShapes()

Dim oSl As Slide
Dim oSlObject As Object
Dim oSlides As Slides Dim osh As Shape
Dim oCom As Object
Dim i As Long
Set oSlides = ActivePresentation.Slides
For Each oSl In oSlides
For each osh In oSl.shapes
If osh.Type = msoEmbeddedOLEObject Then
...
endif
Next
Next oSl

End Sub

Hope, that helps


Gruß HW


WebSite Excelenzen & Powerpoint interaktiv: www.lemitec.de/public
Events zu PowerPoint:VBA Workshop: http://www.ppt-user.de
 
P

PSKelligan

Hi Hans,
That helps some, however I need to enumerate the all of the shapse in the
presentation as well as enumerate just the msoEmbeddedOLEObjects. What would
the syntax be to count all of the shapes and then just all of the
msoEmbeddedOLEObjects in a presentation?

thank you,
Patrick
 
P

PSKelligan

Hi Steve,
That seems to be what I am looking for Steve. It will take a little
Digestion though. Could you tell me what the syntax would be to just count
the msoEmbeddedOLEObjects?

Thanks for all your help,
Patrick
 

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