Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ap._getactive not working anymore
#1
I have a macro that connects to powerpoint, first lines are:

Function pp_run_macro_direct
 
Code:
Copy      Help
;/exe 1

typelib PowerPoint "$program files$\Microsoft Office\Office15\MSPPT.OLB"
PowerPoint.Application ap._getactive; err end "failed to connect to PowerPoint. Try to run this macro in separate process as User."


It used to work on my old laptop with windows 10. On my new laptop with windows 11 the macro compiles fine, and the exe is created, but running it triggers the 'failed to connect to powerpoint' message (and powerpoint is running). The typelib line does point to the right OLB file (it is powerpoint 2013). 

How can I find out what the problem is?
#2
If I use  ap._create   instead of ap._getactive  I get error message:  Library not registered.  I tried registering the OLB file in the tools>comblibraries dialog.  Still error, also restarting qm and laptop have no effect.
#3
Possibly because Office on that computer is 64-bit. QM is 32-bit (there is no 64-bit version).

https://chatgpt.com/share/68d9579c-6d50-...b24633c841

https://www.google.com/search?q=can+a+32...via+COM%3F

Either install 32-bit Office or use a 64-bit scripting app, for example LibreAutomate.
#4
No, the 32-bit version of office 2013 is installed (on a 64-bit laptop).   

I did try repairing office. 

Chatgpt also suggested adding these registry keys:

HKEY_CLASSES_ROOT\WOW6432Node\PowerPoint.Application
HKEY_CLASSES_ROOT\WOW6432Node\PowerPoint.Application.15
HKEY_CLASSES_ROOT\WOW6432Node\CLSID\{91493441-5A91-11CF-8700-00AA0060263B}
HKEY_CLASSES_ROOT\WOW6432Node\TypeLib\{91493440-5A91-11CF-8700-00AA0060263B}


with this reg file:

Windows Registry Editor Version 5.00

; ==============================================
; PowerPoint Application ProgID -> CLSID (32-bit Office)
; ==============================================

[HKEY_CLASSES_ROOT\WOW6432Node\PowerPoint.Application]
@="Microsoft PowerPoint"
"CLSID"="{91493441-5A91-11CF-8700-00AA0060263B}"

[HKEY_CLASSES_ROOT\WOW6432Node\PowerPoint.Application.15]
@="Microsoft PowerPoint"
"CLSID"="{91493441-5A91-11CF-8700-00AA0060263B}"

; ==============================================
; CLSID entries (32-bit)
; ==============================================

[HKEY_CLASSES_ROOT\WOW6432Node\CLSID\{91493441-5A91-11CF-8700-00AA0060263B}]
@="Microsoft PowerPoint Application"

[HKEY_CLASSES_ROOT\WOW6432Node\CLSID\{91493441-5A91-11CF-8700-00AA0060263B}\LocalServer32]
@="\"C:\\Program Files (x86)\\Microsoft Office\\Office15\\POWERPNT.EXE\" /automation"

[HKEY_CLASSES_ROOT\WOW6432Node\CLSID\{91493441-5A91-11CF-8700-00AA0060263B}\TypeLib]
@="{91493440-5A91-11CF-8700-00AA0060263B}"

; ==============================================
; TypeLib entries (32-bit Office)
; ==============================================

[HKEY_CLASSES_ROOT\WOW6432Node\TypeLib\{91493440-5A91-11CF-8700-00AA0060263B}]
@="Microsoft PowerPoint"

[HKEY_CLASSES_ROOT\WOW6432Node\TypeLib\{91493440-5A91-11CF-8700-00AA0060263B}\2.9]
@="PowerPoint 15.0 Type Library"

[HKEY_CLASSES_ROOT\WOW6432Node\TypeLib\{91493440-5A91-11CF-8700-00AA0060263B}\2.9\0\win32]
@="C:\\Program Files (x86)\\Microsoft Office\\Office15\\MSPPT.OLB"



but issue persists.


Forum Jump:


Users browsing this thread: 1 Guest(s)