Open docx in Windows Phone 7 programmatically

前端 未结 2 818
闹比i
闹比i 2021-01-20 18:05

I would like to develop an app for printing service in Windows Phone 7. In the app, the users can select file to print out. Is there any way to open docx, xlsx, etc. in WP7

相关标签:
2条回答
  • 2021-01-20 18:12

    You will not be able to open these types of files from the isolated storage. There is no way for third-party applications to launch the external application required for viewing these file types. All of the files which you have listed in your question are XML-based open source file formats. Depending on how much time you want to spend on this, you could write your own parser or possibly utilize an open-source or commercial one.

    0 讨论(0)
  • 2021-01-20 18:24

    If you are looking to open the document in Office, try using the WebBrowserTask to navigate to the document. There's a good chance it will open with Office.

    If you want to render the document yourself, you are very much out of luck. You could try navigating to the document in a WebBrowser control, but I don't think it's supported.

    Besides, there are no printing APIs so there would be no way to print it. If this is an enterprise application (ie. internal to your company), you might consider writing a web service on a local server that can accept DOCX files and print them. You could then call that service from your app to print the docs.

    0 讨论(0)
提交回复
热议问题