views:

226

answers:

1

Hi

How can I create the preview image for MS Office files like word, excel , power point in cocoa. Can anyone suggest me on this like how to handle those file?. I tried using the Bitmap representation of the .doc files.It dint work.. Which API i can use?..

thank you..

A: 

It sounds like you want to use Quick Look. There is a great example of using Quick Look to generate an NSImage you can display anywhere with this code from Matt Gemmell

Look inside the snippets/QuickLook folder in the ZIP file he links to, and you'll find his code for getting the Quick Look preview for any file. Leopard and Snow Leopard can preview most Office files out of the box without needing Office to be installed.

Alex
Hi Alex thanks for replying... But in that it creates preview of first page of multipage document . and also i dint get How to use for doc and powerpoint files. I used that code for creating previews of images . It works superb. The previews been creared are ultimate. But only thing how can i get the details of the .pps file , like how many slides it contains and all. I need to create preview of each slide ... Any suggestions on this????