Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Need VBA Help with PowerPoint 2010

Posted on 2013-05-10
3
Medium Priority
?
648 Views
Last Modified: 2013-05-16
Hello,

I have 600 images, all around 500K - 1MB in size, that I need to import into a PowerPoint file one image per page.  I have figured out how to use Import Photo Album to get each image on a single slide with a blank title and a caption that is the file name.  What I am looking for is an automated way to copy the image captions (which are the file name) into each slide's Title.  This way, a user can look at the presentation outline and find the image(s) that they want.

In the past I would have used a Macro.  In PP 2010 they did away with macros in favor of VBA.  I know nothing about VBA.  I am hoping an expert would be able to provide me with the VBA code that will meet my needs.  I essentially want to run the macro and have it automatically go to each slide and copy the caption into the Title.

Please let me know if you have any questions!!
0
Comment
Question by:MrChip2
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 23

Accepted Solution

by:
JSRWilson earned 2000 total points
ID: 39157656
vba and macros are the same thing. I guess you mean there is no longer a recorder. It wouldn't have recorded this anyway.

Try this:

Sub getTitle()
Dim osld As Slide
Dim oshp As Shape
For Each osld In ActivePresentation.Slides
For Each oshp In osld.Shapes
If oshp.Type = msoGroup And osld.Shapes.HasTitle Then
osld.Shapes.Title.TextFrame.TextRange = oshp.GroupItems(2).TextFrame.TextRange
oshp.GroupItems(2).Delete
End If
Next oshp
Next osld
End Sub

If you want the caption NOT deleted remove the line
oshp.GroupItems(2).Delete

How to use vba
0
 

Author Comment

by:MrChip2
ID: 39173312
OMG - AMAZING!!

This macro is 10,000% perfect.  Thank you so much!  I'm sorry it took so long to respond.  I would rate this an A+++ and award 1,000 points if I could.  Thanks!
0
 

Author Closing Comment

by:MrChip2
ID: 39173314
See my posted comment.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This video teaches viewers how to add simple and professional themes to their slides.

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question