I would like to remove all images from a document programmatically. I'm using Microsoft Office 2003 and the word 11.0 object library.
I've seen this question answered elsewhere with the following script :
Dim objPic As InlineShape
For Each objPic In word_doc.InlineShapes
Whilst there are circumstances where this code removes some of the images, there are plenty of occasions where it does not. I have a document with a header/footer containing images, these were for example unaffacted.
Is there an enhancement to this code that would literally clean ALL images, wherever they may be. I am not concerned with how the layout of the document might be adversely affected.