How can I use the file preview of the explorer for files or generate a preview with a library?
I have tried the Windows Codepack API, but when trying to get the preview for all kind of office docs, I only get the Icon of the office doc, although the windows explorer shows the preview of the file correctly (windows 10)
Heres my code:
MemoryStream m = new MemoryStream();
ShellFile shellFile = ShellFile.FromFilePath(absolutePath);
shellFile.Thumbnail.FormatOption = ShellThumbnailFormatOption.ThumbnailOnly;
Bitmap shellThumb = shellFile.Thumbnail.ExtraLargeBitmap;
shellThumb.Save(m, ImageFormat.Png);
Corresponding to this post I tried to fix the issue, but the approaches that were shown there didnt work Windows API Code Pack - ShellFile not generating PDF bitmap