Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create Word document in WinRT

I'm currently developing application using WinRT/C#. It is second version, first was developed on WPF. In application I need to generate some reports and export them into MS Word document. In first version of application I used MS Office Interop to export reports in MS Word, but in WinRT there is no support of MS Office Interop. Is there any simple way to create MS Word document in WinRT? (I know there are third party libraries like Syncfusion for WinRT but I would prefer to not use them).

like image 989
EugenSoft Avatar asked Dec 15 '12 18:12

EugenSoft


People also ask

What is MS Word PDF?

It enables you enter and format text. It eliminate most of the time involved in typing and retyping documents. It provides a very simple way of editing and correcting mistakes in documents.


1 Answers

You won't be able to use MS Office interop from a Windows Store app. You could use Open XML SDK, though. It is also available on NuGet and seems to be WinRT compatible.

Using it won't be as easy as working with interop classes and you'll only be able to create XML based docx files, not binary doc files. On the other hand your users won't need to have Word installed and they'll be able to open the files in other Office suites like OpenOffice or LibreOffice. There's a set of tutorials available on MSDN to get you started.

like image 174
Damir Arh Avatar answered Oct 14 '22 12:10

Damir Arh