[SOLVED]MS Office 2010 + Qt
Hello everyone,for one more time i need your help!
In the project i am developing now i want to have the capabillity to export strings to ms word file and print it.After a little search i found that the way to succeed this is to load the dll file used from office create a ms word's class object and do your job.
My questions are :
1)Which is the dll i need to load?
2)Where can i find it(optional)?
3)How would i know the name of the function that i need to call?Is there any manual/guide which including functions names included in the dll in question1?
4)I found a way to load a dll threw QLibrary library.Is this the correct/best way to do that or may i choose another one?
I want to ask sorry from you for asking so many things but i am in a dead-end with this project right now.
Thank you very much
I'm not a great expert, but you should use OLE/COM for that.
Use Qt ActiveX framework ("link":http://doc.qt.nokia.com/latest/activeqt.html) and google for CreateOleObject examples regarding Ms Word.
I just finished my search for your suggestion.I believe this is the way i have to work.Thank you very much for your quick response.Tomorrow i will inform you if it is ok.Again,thank you very much.Have a good night.
If this is about printing only: Qt supports printing to e.g. PDF. Maybe that would get you similar printouts without the need to resort to windows only code.
Thank you both for your answers.
Tobias:Unfortunately it is more complex than just printing.I have to edit threw my app a word document and then to print it.
Now i came up with another problem.I have build up the QAxContainer module as the link Antonio gave me but i don't know how i can use it.
Do you have anything to suggest me?
Thank you very much
Ok guys i found the solution.I had to run "qmake" command from the qt terminal into the folder [C:\Qt\2010.05\qt\src\activeqt] into the folders container and control and then add the
CONFIG += qaxContainer command into your .pro file.
Thank you for your help guys