Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QAxWidget("Word.Application") does not open Word inside the widget

QAxWidget("Word.Application") does not open Word inside the widget

Scheduled Pinned Locked Moved General and Desktop
5 Posts 5 Posters 9.2k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    enufsenuf
    wrote on last edited by
    #1

    Hello,
    I try to have MS Word visible inside a QAxWidget (with all menu bars, pull-downs etc), but for some reason,
    it always opens externally.

    @
    AxApplication = new QAxWidget(QString::fromUtf8("Word.Application"),0);
    AxApplication->dynamicCall("Visible", true );
    @

    If fact, after the dynamicCall, it opens Word as a separate application.

    If I call QAxWidget with a word document directly, it works (but then, I don't see the menu bars of Word).
    @
    AxApplication = new QAxWidget(QString::fromUtf8("c:\temp\xxx.doc"),0);
    @

    I checked many different versions I found in various topics, but I never
    succeeded to open word inside the Widget. All examples I found on the Qt network
    or help do not deal with Excel or Word (inside a Widget). I can open most
    other applications inside.

    Does anyone have a clue?

    Thanks in advance

    1 Reply Last reply
    0
    • EddyE Offline
      EddyE Offline
      Eddy
      wrote on last edited by
      #2

      maybe this "thread":http://developer.qt.nokia.com/forums/viewthread/1871 can help you further?

      Qt Certified Specialist
      www.edalsolutions.be

      1 Reply Last reply
      0
      • K Offline
        K Offline
        kunashir
        wrote on last edited by
        #3

        For excel I used next code:

        @QAxObject *excel = new QAxObject ( "Excel.Application");
        excel->dynamicCall( "SetVisible(bool)", false );@

        Yes, I had other class, but SetVisible(bool) - it is funcition of VBA - if I not mistaken.

        1 Reply Last reply
        0
        • jiapei100J Offline
          jiapei100J Offline
          jiapei100
          wrote on last edited by
          #4

          I'd really love to follow this question...
          Did you find any solution already?
          How about PowerPoint?

          Thank you very much...
          Pei

          Welcome to Longer Vision
          https://www.longervision.com

          1 Reply Last reply
          0
          • D Offline
            D Offline
            DanielSeges
            wrote on last edited by
            #5

            solution is pretty easy :-)
            you have to setControl after dialog->show();

            QDialog * dialog = new QDialog(this);
            QVBoxLayout *l = new QVBoxLayout;
            dialog->setLayout(l);

            QAxWidget* wordDocument = new QAxWidget ("Word.Document", dialog);
            l->addWidget(wordDocument);
            dialog->show();

            wordDocument->setControl (path);

            1 Reply Last reply
            2

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved