June 30, 2011

manar_mk manar_mk
Lab Rat
7 posts

importing *.doc,*.docx to Qt project

 

Hello!
I’ just starting programming on Qt, and I have a lot of questions:
One of them is:
How to show the content of MS Word file document in my project? Which widgets I should use? please help with a little source and documentation

11 replies

June 30, 2011

koahnig koahnig
Mad Scientist
2199 posts

I am of no use in this area. However, did you already notice the examples for ActiveX [doc.qt.nokia.com] They could be a good start for you.

June 30, 2011

Andre Andre
Area 51 Engineer
6076 posts

There are no ready-made widgets that will do exactly what you want. However, you’re not completely lost. MS Word, AFAIK, allows you to embed a Word instance in another application via ActiveX/Com. You can use QAxWidget for that. If you are content with just opening Word itself, then this is much easier. You can get away with just using QDesktopServices for that.

 Signature 

Looking for Qt developers to join our team @ i-Optics: https://qt-project.org/forums/viewthread/25393/

June 30, 2011

Eddy Eddy
Gene Splicer
1296 posts

There is a word viewer if you only want readonly access :
http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=4

With Word Viewer and the Compatibility Pack, you can view, print, and copy document contents to another program. However, you cannot edit an open document, save a document, or create a new document. This download is a replacement for Word Viewer 2003 and all previous Word Viewer versions.
NOTE: If you comply with the other license terms for the Word Viewer, you may distribute this viewer without a document created in Microsoft Office.

Sounds like they have made it available to use in other programs. Hopefully the way Andre explained. haven’t used it in Qt though.

 Signature 

Qt Certified Specialist
Qt Ambassador

June 30, 2011

manar_mk manar_mk
Lab Rat
7 posts

@Eddy I need that function in the my project, not in other application.

June 30, 2011

Andre Andre
Area 51 Engineer
6076 posts

Then, good luck with battling with QAxWidget!

 Signature 

Looking for Qt developers to join our team @ i-Optics: https://qt-project.org/forums/viewthread/25393/

June 30, 2011

manar_mk manar_mk
Lab Rat
7 posts

I am “battling” with QAxWidget, but already need your ideas))

June 30, 2011

Andre Andre
Area 51 Engineer
6076 posts

My idea is, that you can not get a helpful answer to a question, if that question is not formulated in a way that makes the one you expect an answer from understands what your problem is. Try to be more specific in what the problem is, when asking for help. This guide [catb.org] may help you.

 Signature 

Looking for Qt developers to join our team @ i-Optics: https://qt-project.org/forums/viewthread/25393/

June 30, 2011

manar_mk manar_mk
Lab Rat
7 posts

@Andre Thanks a lot))

June 30, 2011

Eddy Eddy
Gene Splicer
1296 posts
manar_mk wrote:
@Eddy I need that function in the my project, not in other application.

@mana_mk
I know of a program that is using the viewer (it’s closed source). So it must be possible.
That’s why i suggested to look into this. it’s less overhead than using word.

 Signature 

Qt Certified Specialist
Qt Ambassador

June 30, 2011

manar_mk manar_mk
Lab Rat
7 posts

@Eddy Thanks. I’ll try

June 30, 2011

dialingo dialingo
Lab Rat
158 posts

Calligra Suite is able to read MS Office files. Calligra (KOffice fork) is open source . You can extract the filters if you like.
http://www.calligra-suite.org/

 
  ‹‹ QSqlQuery and Umlauts      QTextCursor::clearSelection() doesn’t work ››

You must log in to post a reply. Not a member yet? Register here!