Answered Diaplaying office document in surface appllication

  • Thursday, July 15, 2010 4:34 PM
     
     

    Dear all,

    I am looking for a way to display office document in a surface application.
    I have seen an example with powerpoint slides, where aech slides can be easyly converted to PNG files and then be handle as bitmap ressource that can be easily explore in scatterview for instance.

    Then what about Excell and Word document, any ideas how to do ?

    Idea would be to browse a floder for existing office documents and then display them

    regards
    Serge


    Your knowledge is enhanced by that of others.

All Replies

  • Wednesday, July 21, 2010 5:34 PM
     
     
    You can save the word document as .xml & then read it in via some XML parsing - I do a similar thing with Visio
  • Wednesday, July 21, 2010 6:28 PM
     
     

    do you need to use OpenXML for that ?

    serge


    Your knowledge is enhanced by that of others.
  • Wednesday, July 21, 2010 6:48 PM
     
     
    not sure, I know you can save a word doc as an XML word doc - in Word they give that option
  • Thursday, July 22, 2010 11:06 AM
     
     

    If you don't want to change de saving mode and you want to open directly .doc files you can convert them into XPS files that can be handled perfectly by WPF and, by extension, by our surface.

    But you have to know that not all the Word versions can be converted into XPS files. You will find more info surfing the net.

    Regards

  • Thursday, July 22, 2010 11:56 AM
     
     

    But when and how to do perfomr the convertion do XPS ?

    Ideally I would like to get office word document as there are, then at the time of reading perform the convertion by code and then handle it.
    Any sample of this xPS convertion and reading back with WPF?

    I have never done this, if you have sample starting point that will help

    regards
    Serge


    Your knowledge is enhanced by that of others.
  • Thursday, July 22, 2010 12:58 PM
     
     
  • Thursday, July 22, 2010 2:20 PM
     
     

    cool thnaks.

    So with this Office.Interop I can do this for any Office document, even excell or MS project ?

    regards
    Serge


    Your knowledge is enhanced by that of others.
  • Friday, July 23, 2010 8:15 AM
     
     

    I'm not sure at all. The only thing I know is that you cannot convert .doc files before Office 2003


    Regards

  • Friday, August 17, 2012 10:01 AM
     
     

    I have seen an example with powerpoint slides, where aech slides can be easyly converted to PNG files and then be handle as bitmap ressource that can be easily explore in scatterview for instance.

    Can you please post the Link or the sample for the above which will helpfull for us.

    Thanks

  • Monday, August 20, 2012 7:44 AM
     
     Answered

    You just need to Open Powerfpoint, then copnvert all sildes to PNG files in a folder.
    Then You just need to get the list of images from that folder in a list and bind that list to the ItemsSource of your scatterview and that'it.

    If you do not want to separate each slide to individual image and treat the document as a whole then print your document to XPS format and then display that XPS as describe in this post:

    http://sergecalderara.wordpress.com/2012/05/14/handling-an-xps-document-in-a-scatterview-surface-sur40/

    Thanks to mark as answer if it helps

    regards

    serge


    Your knowledge is enhanced by that of others.