Open matt-hoskins opened 5 years ago
I might be having this issue too, although my attempts to use the resolution method described here fails.
I'm running the 32-bit version of Python3 but it does not enumerate all applications installed on my system. I'm attempting to generate constants for PowerPoint but trying both "PowerPoint.Application" and "Microsoft PowerPoint 16.0 Object Library" when I run makepy.py from command line and manually scanning the GUI do not display Microsoft PowerPoint.
The CLSID for PowerPoint is {91493440-5A91-11CF-8700-00AA0060263B} and I can see a folder created within C:\Users\
Has it been confirmed that this is an issue of 32 and 64-bits not playing nice?
I might be having this issue too, although my attempts to use the resolution method described here fails.
evdelen - an alternative which I found works is to call makepy directly against the sources of COM information directly (basically bypass the step makepy performs of finding the source of information). Under 64-bit Office 2016 this is the set of commands I used to run makepy for Word, Excel, Powerpoint and some shared stuff:
python -m win32com.client.makepy "C:\Program Files\Microsoft Office\Root\Office16\MSWORD.OLB" python -m win32com.client.makepy "C:\Program Files\Microsoft Office\Root\Office16\excel.exe" python -m win32com.client.makepy "C:\Program Files\Microsoft Office\Root\Office16\MSPPT.OLB" python -m win32com.client.makepy "C:\Program Files\Microsoft Office\root\VFS\ProgramFilesCommonX86\Microsoft Shared\Office16\MSO.DLL"
Working with 64-bit Office 2016 (with 64-bit Python) I found that makepy doesn't seem to find the application object libraries by name:
makepy.py -d "Microsoft Word 16.0 Object Library" Could not locate a type library matching 'Microsoft Word 16.0 Object Library'
If I run makepy.py without arguments to display the UI it's not on the list either. However looking in an Office app's VBA ui it is listed.
If I do:
makepy.py -d "Word.Application"
... then that does find Word.Application.
Searching for similar cases I found this on stackoverflow: https://stackoverflow.com/questions/13121529/python-makepy-with-office-2013-office-15
I don't know if it's a deliberate decision for there to be "key4 = win32api.RegOpenKey(key3, "%s\win32" % (lcid,))" but then no check under lcid\win64 if that fails (where python is 64-bit), or it's just an oversight as no-one's raised it as an issue!