Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.

SRP.PREVIEW.1

Hi,
We discovered an undocumentend control.
SRP Preview

We found out that we can view Word and Excel files with it.
Very powerful!

Is there also some secret documentation on this control?
Sometimes a Word document does not open on top (scrolled top)
Is it a wrapper?

Thank you.

Regards Ed Keeman

Comments

  • It's a wrapper around the preview used in Windows Explorer. We never documented it because it became clear after using it internally for a while that supporting it would be a nightmare. The preview is completely out of our control. If something doesn't display correctly, there is quite literally nothing we can do about it. Wanna preview a PDF? Users need to have Fox It or Adobe installed, and they have different features to considuer. Word document looks funny? That's because Microsoft decided to strip most formatting and lay it out in a way that shows more information than it might have with formatting.

    By way of documentation, there isn't much to say. There are some properties for setting a caption that appears when the preview does not support a given file type. These properties are OLE.Background, OLE.Caption, OLE.CaptionColor, and OLE.Font.

    To show a file, call the OLE.Preview(Filename) method. To clear the preview, call the OLE.Clear() method.

    That's all there is. Use at you your own discretion. If you are in the position of managing expectations with your users, this could be of use. If, however, you ship this to a wide variety of users, you'll be on support calls with clients who feel it's your job to make the preview look right. That has been our experience.
  • Thanks Kevin.
    We will give it try..


Sign In or Register to comment.