#1
|
|||
|
|||
Putting file name of an imported image onto a slide
I am using PowerPoint in Office 365. I am creating a photo album by bulk importing a set of photos into my PowerPoint project.
Is there any way in which I can display the image file name on the PowerPoint slide? Each slide has a Description in its EXIF data. Is there any way to display that description on the slide? Clearly I can do this manually by retyping the file name and/or description onto each slide, but I am hoping for an automated method. Thank you |
#2
|
|||
|
|||
If you choose one pic / slide rather than fit to slide you can include captions.
If you really need full slide images you could write code to read the alt text and insert it Something based on this (untested code) Code:
Sub add_Caption() Dim L As Long Dim strAlt As String For L = 1 To ActivePresentation.Slides.Count strAlt = ActivePresentation.Slides(L).Shapes(1).AlternativeText If Not strAlt = "" Then With ActivePresentation.Slides(L).Shapes.AddLabel(msoTextOrientationHorizontal, 100, 10, 100, 20) .TextFrame.TextRange = strAlt End With End If Next L End Sub |
#3
|
|||
|
|||
Thank you.
It all looks a bit too complicated for me. I think I'll stay with manually creating the captions. |
#4
|
|||
|
|||
Your choice but you are probably looking at 1/2 day versus 30 seconds.
|
#5
|
|||
|
|||
Your comment about the half-day vs 30 seconds made me think that perhaps I should give it a go. (I had to Google how to use VBA code in a PPT file first!) It worked, but now I have two more questions.
1. How can I position the label at the bottom centre of the slide? I played around with the position numbers in the code but couldn't see how to move it to the bottom. 2. In the code I presume that the "AlternativeText" is the file name. Is there a way to get the macro to pick up the Image Description from the EXIF data instead of the file name? Thanks again. |
#6
|
|||
|
|||
As far as I know there's no simple way to read the description.
This should do a better job of placing the text. USE A COPY! Code:
Sub add_Caption() Dim L As Long Dim strAlt As String Dim SH As Long Dim SW As Long SH = ActivePresentation.PageSetup.SlideHeight SW = ActivePresentation.PageSetup.SlideWidth ' kill old text For L = 1 To ActivePresentation.Slides.Count If ActivePresentation.Slides(L).Shapes.Count = 2 Then If ActivePresentation.Slides(L).Shapes(2).HasTextFrame Then _ ActivePresentation.Slides(L).Shapes(2).Delete End If strAlt = ActivePresentation.Slides(L).Shapes(1).AlternativeText If Not strAlt = "" Then With ActivePresentation.Slides(L).Shapes.AddLabel(msoTextOrientationHorizontal, SW / 2 - 100, SH - 40, 200, 20) .TextFrame.TextRange = strAlt .Left = SW / 2 - .Width / 2 End With End If Next L End Sub |
#7
|
|||
|
|||
Thank you, John
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Putting writing next to an image on Word for CV HELP :(! | ParisP | Word | 3 | 05-29-2015 09:53 AM |
putting image file into a cell of a table | hklein | Word VBA | 1 | 04-19-2013 03:34 AM |
Imported Image Quality between 2007 & 2010 | DaleM | Word | 5 | 04-24-2012 12:54 AM |
slide image wont copy with text to new slide | lewis.mulhollen | PowerPoint | 1 | 12-17-2011 03:17 AM |
Putting an image with hyperlink to certain slides | spiffmonkey1 | PowerPoint | 1 | 07-17-2011 03:58 PM |