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. Using QAxObject and Window Com to Handle Word Stupid Problems
Forum Updated to NodeBB v4.3 + New Features

Using QAxObject and Window Com to Handle Word Stupid Problems

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 1 Posters 181 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.
  • H Offline
    H Offline
    hunter Li
    wrote on 18 Jan 2024, 08:27 last edited by
    #1
               QAxObject* pWord = new QAxObject("Word.Application", this);
    	if (pWord)
    	{
    		pWord->setProperty("Visible", false);
    		QAxObject* pDocuments = pWord->querySubObject("Documents");
    		if (pDocuments)
                }
    

    If you process Word in this way, manage it or set the VS-UAC (requestAdministrator (/level='requireAdministrator ') property, it is highly likely that pDocuments will be null, otherwise it is normal。
    I haven't come up with a good solution yet, so I can't use Python。-_ -

    H 1 Reply Last reply 18 Jan 2024, 08:43
    0
    • H hunter Li
      18 Jan 2024, 08:27
                 QAxObject* pWord = new QAxObject("Word.Application", this);
      	if (pWord)
      	{
      		pWord->setProperty("Visible", false);
      		QAxObject* pDocuments = pWord->querySubObject("Documents");
      		if (pDocuments)
                  }
      

      If you process Word in this way, manage it or set the VS-UAC (requestAdministrator (/level='requireAdministrator ') property, it is highly likely that pDocuments will be null, otherwise it is normal。
      I haven't come up with a good solution yet, so I can't use Python。-_ -

      H Offline
      H Offline
      hunter Li
      wrote on 18 Jan 2024, 08:43 last edited by
      #2

      @hunter-Li
      QAxBase::setControl: requested control Word.Application could not be instantiated
      QAxBase::dynamicCallHelper: Object is not initialized, or initialization failed
      QAxBase::dynamicCallHelper: Object is not initialized, or initialization failed
      Although I know it's a permission issue, is there a better solution?

      1 Reply Last reply
      0

      1/2

      18 Jan 2024, 08:27

      • Login

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