using VBA Office Automation in PowerPoint

J

Joe

Is there any good reference material on how to use the object oriented
features of VBA Office Automation in PowerPoint? I use the object brower,
but that just tells me what object or method is a parent or child of another.
What I need is a reference that tells me about each and every object,
parent, child, method, property and so on, what they do, how they are used,
etc. I mean, if Microsoft is going to spend money on developing the thing,
shouldn't it be in their benefit to tell other people about it?
For example, I needed to left justify some text that seemed to be centered.
How was I suposed to know that it needed to be in the ParagraghFormat object?
I did some googling and other seaching, took a wild guess, and hacked it
until I got it to work. The working method is below.
It seems to be soooooo backwards to have to do all that hacking just to get
some text to justify. I still don't know how to add additional "shapes" into
a slide. I can add shapes, like text boxes, when using the gui in
Powerpoint, but how to do the same in VBA?
Also, what are all those different ppLayout thingies? I mean like
ppLayoutBlank, ppLayoutChart, ppLayoutText, and so on. What do these things
look like? How do I use them? It would really be nice to have some decent
documentation on the product.
Thanks
Joe


thisSlide = .Slides.Count + 1
.Slides.Add thisSlide, ppLayoutText 'bulleted list
.Slides(thisSlide).Shapes(1).TextFrame.TextRange.Text = "Internal
Program Review"
.Slides(thisSlide).SlideShowTransition.EntryEffect = ppEffectFade
With .Slides(thisSlide).Shapes(2).TextFrame.TextRange
.Text = ReadSlide01
.ParagraphFormat.Alignment = ppAlignLeft
With .Font
.Name = "Arial"
.Size = 10
End With
End With

..Slides(thisSlide).Shapes(1).TextFrame.TextRange.Characters.Font.Size = 32
 
C

Cindy M.

Hi =?Utf-8?B?Sm9l?=,
Is there any good reference material on how to use the object oriented
features of VBA Office Automation in PowerPoint?
Your best resource is the Powerpoint newsgroup. And those are the folks
who will know which books would benefit you most. You'll find links to
Office-related newsgroups (including powerpoint) on this page

http://msdn.microsoft.com/newsgroups/topic.aspx?url=/MSDN-FILES/028/201/0
08/topic.xml

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 
S

Steve Rindsberg

Is there any good reference material on how to use the object oriented
features of VBA Office Automation in PowerPoint?

Depending on the version of PPT you use, the VBA help is anything from fairly
good to sad indeed. The later, the worse.

And while the macro recorder doesn't produce very good code, it'll often give
you a good feel for what objects and properties you need to work with in order
to accomplish a specific task.

There's also the Programming section of the PPT FAQ (www.pptfaq.com) and the
other sites it links to; there are quite a few code examples there.
 

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