
4,001 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Looking for VBA code for Excel that will read the Alt Text for an image and paste the alt text string in a cell.
https://learn.microsoft.com/en-us/office/vba/api/excel.shape.alternativetext only showed an example for how to set Alt Text but not how to return the alt text in a cell.
For example, to put the Alt Text of the first shape to F1:
Range("F1").Value = Worksheets(1).Shapes(1).AlternativeText
If the picture has some name:
Range("F1").Value = Worksheets("Sheet1").Shapes("MyPicture1").AlternativeText