enthought / enthought/comtypes
getting OSError: [WinError -2146959355] Server execution failed when opening word doc
- Dominant language
- Python
- Stars
- 345
- Forks
- 105
- PR merge metrics
- No merged PRs in 30d
Description
When running on Windows 10 Pro 10.0.19541 N/A Build 19541 and using;
https://www.python.org/downloads/release/python-381/
When I do:
wdToPDF = CreateObject("Word.Application")
wdFormatPDF = 17
if os.path.exists(pdf_path):
os.remove(pdf_path)
pdfCreate = wdToPDF.Documents.Open(word_path)
I get:
File "C:\Users\mlwp\AppData\Local\Programs\Python\Python38-32\lib\site-packages\comtypes\client\__init__.py", line 238, in CreateObject
obj = comtypes.CoCreateInstance(clsid, clsctx=clsctx, interface=interface)
File "C:\Users\mlwp\AppData\Local\Programs\Python\Python38-32\lib\site-packages\comtypes\__init__.py", line 1225, in CoCreateInstance
_ole32.CoCreateInstance(byref(clsid), punkouter, clsctx, byref(iid), byref(p))
File "_ctypes/callproc.c", line 948, in GetResult
OSError: [WinError -2146959355] Server execution failed
Contributor guide
Assessment
This issue has not been assessed yet.