View Single Post
 
Old 08-19-2017, 02:35 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,370
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Word doesn't store those data in a form accessible to VBA (Note: pixels don't really have a size; just horizontal & vertical counts, though the image metadata sometimes suggest a nominal scaling like 72dpi). To do something like you've asked for, you'd need code that takes the retrieved filename & path, then extracts those data from the original image (assuming it's still there!). However, even that can't be relied on as the image may have been compressed and/or cropped in Word, which can involve both reducing the pixel count and applying jpg compression to it - resulting in a much smaller file in Word than the file on disk. Furthermore, vector images don't have any pixel-related data.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote