Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
extract the alternative text into Word
Author Message
anrtey Offline
Newbie
*

Posts: 1
Joined: May 2017
Reputation: 0
Thanks: 0
Given 0 thanks in 0 posts
 
Post: #1
extract the alternative text into Word
Hi,

I got a Word document with quite a few pictures and tables which contain alternative texts to explain the details.

And I can only to right click on them to open the "Format Picture" or "Table Properties", then check the alternative texts in "Alt Text". I need to do that one by one.

Can I get a way to quickly get the alternative texts of all pictures and tables in this word document? I'm using word 2010. Thank you.
05-16-2017 02:01 AM
Find all posts by this user Quote this message in a reply
Natery Offline
Newbie
*

Posts: 1
Joined: May 2017
Reputation: 0
Thanks: 0
Given 0 thanks in 0 posts
 
Post: #2
RE: extract the alternative text into Word
hello,

If you are talking about to batch extract and insert the alternative text of an object into document, you should use VBA macro to do that

I just get a code, and it seems just what you want, see below:

Sub ShowAltTextBelowPic()
Dim objDoc As Document
Dim objShape As Object

Set objDoc = ActiveDocument

With objDoc
For Each objShape In .Shapes
objShape.ConvertToInlineShape
Next

For Each objShape In .InlineShapes
objShape.Range.InsertAfter vbNewLine & objShape.Title & vbNewLine & objShape.AlternativeText
Next

For Each objShape In .Tables
objShape.Select
Selection.Collapse wdCollapseEnd
Selection.InsertAfter vbNewLine & objShape.Title & vbNewLine & objShape.Descr
Next

End With
End Sub

And here is the link to the code,

https://www.datanumen.com/blogs/2-ways-t...r-objects/

Hope it helps.
05-19-2017 06:13 AM
Find all posts by this user Quote this message in a reply
Post Reply