1,910 questions
0
votes
0
answers
27
views
JNA CoCreateInstance returns S_OK but ShellLink/IShellLinkW fails, COM pointer is non-null but object unusable
I'm making a Java app that scans the Windows Recent Files folder and resolves .lnk shorcuts to their actual file paths. I'm doing so using JNA the JNA API and simulating IShellLinkW and IPersistFile.
...
1
vote
1
answer
106
views
Python Win32Com: How do I open a password-protected Powerpoint?
I tried to use the below code to open a password-protected ppt, but I got error:
TypeError: Open() got an unexpected keyword argument 'Password'
Is it possible to use Win32Com to open a password-...
1
vote
1
answer
95
views
Copy pasting Excel range to Outlook email - GetInspector Error
I don't recall making any changes to the code, but now my helper function for sending emails gets the following error:
com_error: (-2147352567, 'Exception occurred.', (4096, 'Microsoft Outlook', 'The ...
0
votes
0
answers
53
views
Can you override the "This file is in use" message from excel when interacting with it from vscode (python)
I am attempting to connect python to excel, using VSCode, a pySide6 GUI and xlwings and win32com. Whilst I can manage to update an excel document when it is closed, I cannot seem to be able to do live ...
1
vote
1
answer
137
views
Saving Excel files as PDF using win32com python library and getting error
I'm trying to run a script that reads a txt file that contains a list of file paths to Excel files, and save each one as a pdf in a specified directory. I can get it to read the txt file and parse ...
0
votes
2
answers
148
views
How to access "Groups" folder in Outlook using pywin32
I am trying to read emails of a particular mail group using pywin32 which, is showing under "Groups" of my outlook mail (shown in screenshot). I am able to access all the folders under my ...
2
votes
1
answer
27
views
Issues with printing docx using win32com pyhon
Im running a simple app in python that is supposed to print a set number of pages from a document im working on. The document is 8 pages long but using
doc = word.Documents.Open(abs_docx_path)
doc....
0
votes
0
answers
100
views
No module named 'pywintypes'; seemingly problem with virtual environment
I've read through all the relevant posts to this question, but sadly most remain unanswered, or don't seem to apply to my specific situation.
I want to use the win32com module, which is part of the ...
0
votes
0
answers
17
views
Discrepancy in Win32com Word Application output and GUI output
I am using win32com to extract a Word document Flesch score directly instead of through the editor, because I would like to automate and store in bulk all the Flesch scores for multiple Word documents....
0
votes
0
answers
85
views
Python flask API to convert DOCX to PDF
I created a Python Flask API to convert DOCX files to PDF. It works perfectly when I start it manually via the command line. However, I’d like to turn it into a Windows service so that it can start ...
2
votes
0
answers
329
views
PyWin32 throws "pywintypes com_error call was rejected" error, but only when NOT running from CMD
System setups:
Development PC: Win 10,Python 3.7.7, PyInstaller 5.3.12
Deployment PC: Win11, No Python installled
I've made a CLI python script (running from Windows CMD) with the following simple ...
0
votes
0
answers
23
views
How to deal with Pop-Ups during doc to docx/xls to xlsx conversions using win32
While converting a large number of old MS office documents, Pop-Ups asking for document passwords, permission to save a file without macros, or hinting that files contain comments or revisions occur ...
1
vote
1
answer
65
views
Python script to generate powerdesigner reports for all open models within a workspace
I am trying to automate the creation of powerdesigner data model reports on multiple physical models in an active workspace using Python- more using the specifically the win32com module. I'm fairly ...
1
vote
0
answers
137
views
Using IUnknown-derived interface in python / pywin32
In short: I'm trying to call a method on in IUknown-based interface. I have some parts, but they don't connect.
Situation:
o1 = win32com.client.Dispatch("SomeProgId")
o2 = o1.SubObject
The ...
2
votes
0
answers
84
views
Python cannot open Excel instance on windows server when remote connection to admin account is disconnected
I have a NodeJS application/website running on a Windows Server. This application is used as a GUI to trigger Python scripts. The python scripts open up excel instances and perform some ...
1
vote
1
answer
91
views
Resize the image in Power point using Python
I am copying a Excel chart and pasting it into a PowerPoint slide.
After pasting the chart I want resize the chart which is pasted in image format.
Kindly help
import win32com.client
# Grab the ...
0
votes
2
answers
521
views
Python obtain latest email from a sender using win32com.client
Trying to obtain the last email sent by a sender in outlook so I can download an attachment.
The issue I have is that the date the email was sent is not consistently sent every day so using something ...
1
vote
0
answers
51
views
How do I make variable aware of the output of gencache.EnsureModule?
workaround In the end I just copied the make_py output to my project and imported the entry-point class.
How do I make win32com.client.Dispatch(APPID) aware there is a gencached version?
Consider the ...
0
votes
0
answers
86
views
Error with an <empty> cell value in UniSim's spreadsheet connection with python via win32com.client
I'm trying to make a connection between python and UniSim Design, using jupyter-notebook. But I'm stucked with an error. The error follows below:
C:\ProgramData\Anaconda3\lib\site-packages\win32com\...
1
vote
1
answer
221
views
pywintypes.com_error when using getCellValue in SAP GUI Scripting with Python
I'm working on a Python script that interacts with SAP GUI using the win32com.client module. My goal is to retrieve a specific cell value from a table within SAP. However, I'm encountering an error ...
0
votes
2
answers
100
views
Outlook using python win32com reading only email till a specific date and nothing after that
Below is my Python code using win32com to read emails from a particular folder.
from logging import root
import os
import win32com.client
from datetime import datetime, timedelta
import zipfile
...
1
vote
0
answers
41
views
How to open Outlook, open an email, and click on download button?
I use a batch file to run to open and close Outlook. After opening, how to open an email, and click on the download button using python 'import win32com.client' library? any suggestions?
I was able ...
0
votes
0
answers
36
views
win32com Excel terminating python program out of nowhere
I'm using a library called Excel2Image in order to take a sheet range in excel and save it as a video. This library uses win32com in order to get an excel application.
Inside of my main program, ...
1
vote
0
answers
58
views
Windows OS: Win32_PerfRawData_PerfProc_Process Virtual Memory is not matching with resource monitor's Commit Memory
I am trying to pull the Process metrics using Win32_PerfRawData_PerfProc_Process as documented at https://learn.microsoft.com/en-us/previous-versions/aa394323(v=vs.85)
From the document, VirtualBytes ...
1
vote
1
answer
618
views
(4096, 'Microsoft Outlook', 'The operation failed.', None, 0, -2147287037) error when saving an email to my local machine
I am trying to download some emails from my outlook folder to my local machine as .msg files using the following code.
messages = source_folder.Items
for message in messages:
# Estimate the size ...