Office & Productivity Software forum

General discussion

Powerpoint

by vineetmenon / March 13, 2007 3:16 PM PDT

Is it possible to have a count of the number of pictures in a powerpoint, using a macro.....
my job is to identify all the pictures and format teh picture by ungrouping and changing their fonts....is it possible??
please do help me....

Discussion is locked
You are posting a reply to: Powerpoint
The posting of advertisements, profanity, or personal attacks is prohibited. Please refer to our CNET Forums policies for details. All submitted content is subject to our Terms of Use.
Track this discussion and email me when there are updates

If you're asking for technical help, please be sure to include all your system info, including operating system, model number, and any other specifics related to the problem. Also please exercise your best judgment when posting in the forums--revealing personal information such as your e-mail address, telephone number, and address is not recommended.

You are reporting the following post: Powerpoint
This post has been flagged and will be reviewed by our staff. Thank you for helping us maintain CNET's great community.
Sorry, there was a problem flagging this post. Please try again now or at a later time.
If you believe this post is offensive or violates the CNET Forums' Usage policies, you can report it below (this will not automatically remove the post). Once reported, our moderators will be notified and the post will be reviewed.
Collapse -
Re: macro in powerpoint
by Kees Bakker / March 13, 2007 6:37 PM PDT
In reply to: Powerpoint

Vineetmenon,

Your question seems like a sequel to an earlier discussion in http://forums.cnet.com/5208-6129_102-0.html?forumID=29&threadID=238076&messageID=2428552.
But I'll answer it here.

Yes, that surely is possible. But you have to know about Powerpoint VBA to do it. Loop through the collection of slides. In each slide, loop through the collection of shapes. If a shape is a picture: count it and at the end you've got the total number of pictures in the presentation.

There undoubtedly also are methods for ungrouping objects and changing fonts.

I think an experienced Powerpoint-programmer could make what you want in about half a day. But it's more or less impossible for a non-programmer. So if this is "your job" better go to your boss and ask him to send you to a programming course to start with.

Hope this helps.


Kees

Collapse -
thanks
by vineetmenon / March 13, 2007 7:32 PM PDT

hey thanks for the reply....i felt this reply to be much more clearler....yes i got the idea..

Collapse -
another problem..donno why this is happeneng
by vineetmenon / March 14, 2007 7:48 PM PDT

hey thansk......
but i got another problem.....
for example when i put the slide in teh loop i am able to modiy all teh picctures.....but when i ungruop a particular picture,the loop is skipping the immediate next picture and ungroupign the next picture....i donno why this is happeneng.....

see tru my code:
Sub ungroup()
Dim oSh As Shape
Dim oSl As Slide
For Each oSl In ActivePresentation.Slides
a = oSl.SlideNumber
If a = 4 Then
For Each oSh In oSl.Shapes
Debug.Print oSh.Name
Select Case oSh.Type
' add other types as needed
Case Is = msoEmbeddedOLEObject, msoPicture
oSh.ungroup

Case Else
' do nothing
End Select
Next ' shape
End If
Next ' Slide

End Sub

Popular Forums
icon
Computer Newbies 10,686 discussions
icon
Computer Help 54,365 discussions
icon
Laptops 21,181 discussions
icon
Networking & Wireless 16,313 discussions
icon
Phones 17,137 discussions
icon
Security 31,287 discussions
icon
TVs & Home Theaters 22,101 discussions
icon
Windows 7 8,164 discussions
icon
Windows 10 2,657 discussions

CNET FORUMS TOP DISCUSSION

Help, my PC with Windows 10 won't shut down properly

Since upgrading to Windows 10 my computer won't shut down properly. I use the menu button shutdown and the screen goes blank, but the system does not fully shut down. The only way to get it to shut down is to hold the physical power button down till it shuts down. Any suggestions?