Dim pShape as Word.Shape For each pShape in ActiveDocument.InlineShapes with pShape.Range .InsertBefore "<image>" .InsertAfter "</image"> end with Next
This assumes that your images are inline (rather than floating). If they're floating, you'll need to provide more info about the intended result.
>i have to add a text <image> before all the images and </image> after all >the > images in a MS word doc using VBA coding. > > can anyone help me with its code?
Dear Jezebel thanks for your help. i tried your code but it is not working. it shows some error in the third line of your code. it selects ".range" and gives a message that data member not found.
> Dim pShape as Word.Shape > For each pShape in ActiveDocument.InlineShapes [quoted text clipped - 12 lines] > > > > can anyone help me with its code?