Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 08-09-2020, 11:15 PM
RobertWA RobertWA is offline Putting file name of an imported image onto a slide Windows 10 Putting file name of an imported image onto a slide Office 2019
Advanced Beginner
Putting file name of an imported image onto a slide
 
Join Date: Jan 2014
Posts: 33
RobertWA is on a distinguished road
Default 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
Reply With Quote
  #2  
Old 08-10-2020, 05:07 AM
JohnWilson JohnWilson is offline Putting file name of an imported image onto a slide Windows 10 Putting file name of an imported image onto a slide Office 2016
Programmer
 
Join Date: Nov 2008
Location: UK
Posts: 1,912
JohnWilson has a spectacular aura aboutJohnWilson has a spectacular aura about
Default

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
__________________
Microsoft PowerPoint MVP 2007-2023
Free Advanced PowerPoint Tips and Tutorials
Reply With Quote
  #3  
Old 08-10-2020, 05:42 AM
RobertWA RobertWA is offline Putting file name of an imported image onto a slide Windows 10 Putting file name of an imported image onto a slide Office 2019
Advanced Beginner
Putting file name of an imported image onto a slide
 
Join Date: Jan 2014
Posts: 33
RobertWA is on a distinguished road
Default

Thank you.


It all looks a bit too complicated for me. I think I'll stay with manually creating the captions.
Reply With Quote
  #4  
Old 08-10-2020, 05:50 AM
JohnWilson JohnWilson is offline Putting file name of an imported image onto a slide Windows 10 Putting file name of an imported image onto a slide Office 2016
Programmer
 
Join Date: Nov 2008
Location: UK
Posts: 1,912
JohnWilson has a spectacular aura aboutJohnWilson has a spectacular aura about
Default

Your choice but you are probably looking at 1/2 day versus 30 seconds.
__________________
Microsoft PowerPoint MVP 2007-2023
Free Advanced PowerPoint Tips and Tutorials
Reply With Quote
  #5  
Old 08-10-2020, 06:44 AM
RobertWA RobertWA is offline Putting file name of an imported image onto a slide Windows 10 Putting file name of an imported image onto a slide Office 2019
Advanced Beginner
Putting file name of an imported image onto a slide
 
Join Date: Jan 2014
Posts: 33
RobertWA is on a distinguished road
Default

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.
Reply With Quote
  #6  
Old 08-11-2020, 01:42 AM
JohnWilson JohnWilson is offline Putting file name of an imported image onto a slide Windows 10 Putting file name of an imported image onto a slide Office 2016
Programmer
 
Join Date: Nov 2008
Location: UK
Posts: 1,912
JohnWilson has a spectacular aura aboutJohnWilson has a spectacular aura about
Default

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
__________________
Microsoft PowerPoint MVP 2007-2023
Free Advanced PowerPoint Tips and Tutorials
Reply With Quote
  #7  
Old 08-11-2020, 05:06 AM
RobertWA RobertWA is offline Putting file name of an imported image onto a slide Windows 10 Putting file name of an imported image onto a slide Office 2019
Advanced Beginner
Putting file name of an imported image onto a slide
 
Join Date: Jan 2014
Posts: 33
RobertWA is on a distinguished road
Default

Thank you, John
Reply With Quote
Reply

Thread Tools
Display Modes


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 file name of an imported image onto a slide 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
Putting file name of an imported image onto a slide slide image wont copy with text to new slide lewis.mulhollen PowerPoint 1 12-17-2011 03:17 AM
Putting file name of an imported image onto a slide Putting an image with hyperlink to certain slides spiffmonkey1 PowerPoint 1 07-17-2011 03:58 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:59 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft