View Single Post
 
Old 11-25-2014, 08:08 AM
Izzie7 Izzie7 is offline Windows 7 64bit Office 2010 32bit
Novice
 
Join Date: Nov 2014
Location: Israel
Posts: 5
Izzie7 is on a distinguished road
Default Return value of StyleRef n in VBA variable

I want to change the Alternative Text and Title in InLine Shapes (there are a lot) to be the previous Heading 4 and Heading 3 respectively. I can set the value to a constant with this code, but I have not figured out how to set them to be = StyleRef N field values. Any ideas?

Sub Macro1()
'
' Macro1 Macro
' Alt_text_removal
'
m = ActiveDocument.InlineShapes.Count
For n = 1 To m
With ActiveDocument.InlineShapes.Item(n)
.AlternativeText = ""
.Title = ""
End With
Next n
End Sub
Reply With Quote