Knowledgebase

status_loader

Preview eml files

Question / Problem

I want to display an .eml file in the FilePreview component, but it doesn't work. Is this supported?

Answer / Solution

It seems, that depending on the Windows version, the system's preview handler is not automatically registered.

You can do so manually in the registry, or implement the "OnLoadPreview" event to assign the Preview Handler GUID, e.g. :

if (UpperCase(ExtractFileExt(eventArgs.Path)) = '.EML') then begin
  
eventArgs.PreviewHandlerGuid := TShellPreviewHandlerGuids.Mime;

Need further help getting started?

You did not find what you were looking for? Please contact us so we can provide an answer to your question.

Contact Form