One wonders why you'd even bother with such an approach, when it's easy enough to test whether a given image is linked or embedded without it and, if not, replace said image, all without the risk of corrupting the document...
PS: Instead of re-opening old threads (i.e.
https://www.msofficeforums.com/word/...rd-2007-a.html) for a substantially different issue, please start your own.