Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 980665
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T04:25:13+00:00 2026-05-16T04:25:13+00:00

I am using Qt 4.5.3 and Windows XP. I need my application to generate

  • 0

I am using Qt 4.5.3 and Windows XP. I need my application to generate documents that contains the information that is being used and generated. The information that is being used will be just strings (QString to be more specific) and the information that is being generated will be strings and images as well.

I want documents to be a MS word document (.doc) or can be an Open Document Format (.odt) Also I want the documents to be formatted with fonts,images, tables of data, some background colors and all.

I have done the creation PDF files using QTextDocument, QTextCursor and QPrinter. But when I tried to apply the same QTextDocument for odt, I ended up with just format error.

Is there a way to generate such documents using any other libraries that use C++? How you guys use to generate such documents (.odt/.doc) in C++? Any pointers, links, examples regarding this are welcome.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T04:25:14+00:00Added an answer on May 16, 2026 at 4:25 am

    I have done this through the Qt way. i.e by using ActiveQt module.

    The reference documentation for MS Word can be obtained through,

    MSDN documentation, which actually pointed to the VBAWD10.chm file that has the ActiveX apis for MS Word.

    The Word Application can be initialized by

    QAxWidget wordApplication("Word.Application"); 
    

    The sub-objects of the word application can be obtained through the function,

    QAxBase::querySubObject()
    

    For e.g:

    QAxObject *activeDocument = wordApplication.querySubObject("ActiveDocument");
    

    To pass the obtained sub-object as an argument,

    QVariant QAxBase::asVariant () const
    

    Any function calls involving the word object can be called using the function using,

     QAxBase::dynamicCall ()
    

    For e.g:

    activeDocument->dynamicCall("Close(void)");
    

    After a quite good amount of struggle and few convinces, it’s working fine. 🙂

    Hope it helps for those who are all looking for similar solutions…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to find some strings that the current version of Windows is using.
I need to design a windows application that will reside within an organization's intranet.
I have several .reg (Windows registry) files (generated by an external application) that need
I need to deploy a Windows Forms application using ClickOnce deployment. (VS2008, .NET 3.5)
I am using ClickOnce deployment for a Windows Forms application and I need configuration
I am using Infragistics UltraGrid in a Windows Forms application. I need an event
I created my ClickOnce application witch will install a small windows form application that
I'm working on windows application using C#. I generated the Report using IE control.
I have python application that shoud be launched as windows executable. I'm using py2exe
I have developed a window application in VS2005 using C#. I need to integrate

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.