I am able to successfully extract thumbnails from files using the Windows API Code Pack:
Bitmap shellThumb = sf.Thumbnail.ExtraLargeBitmap;
where sf
is a ShellFile
.
This works for all files that have a thumbnail generated. But, for example, if a Word document has not been saved with the option "Save Thumbnail" selected, then there will only be an icon generated for this file and not the actual thumbnail/preview.
I would like to know if there is a way to generate a thumbnail for these files without having to save each file manually with that option selected. Specifically, I want a solution in C#? I have searched for this, but have not yet found any solutions in C#.
Many thanks.