A VBA macro for Word that toggles image visibility. Created to deal with the fact that Microsoft removed Show Image Placeholders from recent versions of Word. This was to fill a need to quickly and easily toggle images in a non-destructive manner, and in a way that works natively in Word. After some research, the methods found were that inline images could be hidden with a setting in Fonts, ActiveDocument.InlineShapes(i).Range.Font.Hidden
, and floating images could be hidden with a setting in Shapes, ActiveDocument.Shapes(i).Visible
.
So, in brief, the macro functions by looping through every iteration of inline and floating images, and switches its visibility state to the inverse of whatever it is at present. As such, assuming all images are visible (conversely, hidden), the macro will render them hidden (conversely, visible). This does mean that, as it stands, the macro will confuse matters if some images are already hidden in the same manner, but assuming that all images are in an identical state, this will work as intended. Furthermore, this does not account for images in headers or footers, as this seemed like unnecessary functionality, given that this macro was designed specifically to be able to hide images from the user---the use case this was created for was to hide graphic medical photos from view when editing an article on such subject matter.