List styles in Word document with preview


The sample code from my previous post does a pretty good job listing the styles in a Word document. However, having a preview of these styles makes it a lot easier to spot the subtle differences than by using the Description object.

For generating a preview of the styles I used some code posted by L Webber on MSDN for manipulating clipboard. I’ve also added the functionality of finding out the clipboard format in which Word copies PNG and saving the content of the clipboard to a local file.

The result:



Note: please make sure to recompile the VBA proeject before running (simply open the VBE window) in order to avoid crashes.


Comments (0)

Skip to main content