win32com

Python and Win32com module issue with querying SQL Database rows

Python and Win32com module issue with querying SQL Database rows Question: My goal is to display SQL queries via the Python console using the Win32com module. I am able to use a comobject to access and successfully display the fields of a SQL query however when i try to display rows i am falling into …

Total answers: 2

win32.client com_error "Array index out of bounds"

win32.client com_error "Array index out of bounds" Question: I have a short function that compiles a list of all the emails in a specific outlook folder and then saves the attachments to a specific folder. I last used this function successfully about 3 months ago and it seems something has broken it. The exception: com_error: …

Total answers: 1

'Cannot save the attachment' error when retrieving Outlook email

'Cannot save the attachment' error when retrieving Outlook email Question: As of today I am receiving an error when attempting to save email attachments from Outlook using Python and win32com library. This was previously working however since modifying the code to get only the latest emails, the attachments are no longer being saved to the …

Total answers: 1

trigger an action on new email using the python win32com module with outlook

trigger an action on new email using the python win32com module with outlook Question: is it possible to trigger some action when a new mail arrives in outlook using the python module win32com pseudocode while 1 if a mail arrives do x Edit: I’m not allowed to use "run script" rule Asked By: Marco Nappi …

Total answers: 2

Python win32com – Class not registered error

Python win32com – Class not registered error Question: I’m trying to control a device (Gamry Interface 5000 Potentiostat) via its COM interface using win32com. # Imports import win32com.client as client # Get device list devices = client.Dispatch(‘GamryCOM.GamryDeviceList’) # Iterate through devices for i in range(devices.Count()): # Get device (this wors as we only have one …

Total answers: 3

How to pass an empty optional argument from Python to Excel VBA macro

How to pass an empty optional argument from Python to Excel VBA macro Question: I am using Python to test an Excel VBA macro. The macro has two optional parameters. As long as only the last or both parameters should be omitted I am fine. I just pass the preceding parameters. I don’t know how …

Total answers: 2

How do I convert a .msg outlook file to a .txt file with python 3.9?

How do I convert a .msg outlook file to a .txt file with python 3.9? Question: Please help a beginner python student out! I would really appreciate it. I am trying to automatically filter emails from my inbox and save them as a text document in a specified folder. I can get the emails in …

Total answers: 2

Retrieve Excel Workbook Connection Properties

Retrieve Excel Workbook Connection Properties Question: I am attempting to grab the “Command Text” from the Connection Property window in an Excel file using python. However, I cannot find the object that contains this information. In the below picture I would like to retrieve the highlighted EXEC sp_FooBar as a string: I am able to …

Total answers: 1