Hi everyone,
I'm programming a script to go through a word document and find inlineshapes so alternative text can be added. Currently I do the following:
With ActiveDocument
For I = 1 To .InlineShapes.Count
Application.StatusBar = "Alternative Text for " & Rangename
If .InlineShapes(I).AlternativeText = blank Then
.InlineShapes(I).AlternativeText = Selection.Address(External:=True) & "-AKA-" & Rangename
End If
Next I
End With
This gets the job done but does a LOT of looping once there's a whole bunch of inlineshapes to loop through.
Is there a way, from the current cursor location, to find the next inlineshape? This would allow me to jump to the right chapter or bookmark, back up a couple pages (just to be sure) and start the loop. Since it would find what it needs sooner the amount of looping would be greatly reduced.
A million thanks in advance.
kindest regards,
kkjensen
I'm programming a script to go through a word document and find inlineshapes so alternative text can be added. Currently I do the following:
With ActiveDocument
For I = 1 To .InlineShapes.Count
Application.StatusBar = "Alternative Text for " & Rangename
If .InlineShapes(I).AlternativeText = blank Then
.InlineShapes(I).AlternativeText = Selection.Address(External:=True) & "-AKA-" & Rangename
End If
Next I
End With
This gets the job done but does a LOT of looping once there's a whole bunch of inlineshapes to loop through.
Is there a way, from the current cursor location, to find the next inlineshape? This would allow me to jump to the right chapter or bookmark, back up a couple pages (just to be sure) and start the loop. Since it would find what it needs sooner the amount of looping would be greatly reduced.
A million thanks in advance.
kindest regards,
kkjensen