Questions tagged [win32com]

win32com is a Python module to interact with Windows COM components. It is part of the Python for Win32 (pywin32) project by mhammond.

win32com is a Python module to interact with windows COM components. It is part of the Python for Win32 (pywin32) extensions project by mhammond, which provides access to many of the Windows APIs from Python.

The Python COM package can be used to interface to almost any COM program (such as the MS-Office suite), write servers that can be hosted by any COM client (such as Visual Basic or C++), and has even been used to provide the core ActiveX Scripting Support.

1868 questions
0
votes
0 answers

Improve Performance of win32com During Find and Replace Word Document

I'm trying to create a script to find and replace multiple words in a Word Document, win32com works really well for this, but it's pretty slow and with more than 10 terms it can several minutes. This script takes ~5 minutes to finish and there's 1…
Spooknik
  • 13
  • 1
  • 5
0
votes
1 answer

Using Python s' win32com along with Foxpro (VFP OLEDB provider)

Currently I am trying to make a connection with a foxpro database using the python win32com module. The Python code currently looks like this: import win32com.client conn = win32com.client.Dispatch('ADODB.Connection') dsn =…
0
votes
1 answer

Portable application not showing in win32com browser, how to dispatch it?

There is a portable software which communicates with a scientific instrument. It is a portable software, where one can just copy the whole folder to anywhere in any PC. And by double clicking the '.exe' file, one can start to talk to the instrument…
user2165
  • 1,951
  • 3
  • 20
  • 39
0
votes
3 answers

Personalized Attachments to Each Recipient From Outlook using Python

Consider the following scenario: User 1: From Address = "sender@domain.com" To Address = "Receiver_1@domain.com" Attachment = "common path --> file_1" User 2: From Address = "sender@domain.com" To Address = "Receiver_2@domain.com" Attachment =…
0
votes
1 answer

Simple Music Player Wont Play

I'm trying to write a simple music player. For some reason after I select a mp3 file and hit the play button, no sound occurs. No error, nothing. It seems to skip right over the command. Anyone know why it may be doing this? If there is a better way…
rectangletangle
  • 50,393
  • 94
  • 205
  • 275
0
votes
1 answer

win32com and IPICalculation secondary interface

I'm working on an interface to OSISoft's PISDK through win32com. I'm trying to use one of IPICalculation's functions, but since IPICalculation is a secondary interface, I'm having problems getting it to work. What I have so far is: from…
Ronan Paixão
  • 8,297
  • 1
  • 31
  • 27
0
votes
2 answers

How to save MS Outlook attachments from specific sender and date using Python

I am a bit new to coding and I am trying to understand how to get Python to save MS Outlook attachments from a specific sender. I currently receive the same email from the same person each day regarding data that I need to save to a specific folder.…
MHP
  • 21
  • 2
0
votes
1 answer

AttributeError: .Range

I'm trying to autofill with "fill series" formatting the value of cell A11 into A12 on two worksheets. This needs to be achieved using win32com module. My code is: from win32com.client import Dispatch from win32com.client import constants xl =…
makman
  • 139
  • 1
  • 3
  • 14
0
votes
0 answers

Can I automate changing the prompt in Excel Ad-in using Python?

I have performed web browser automation and other excel data analysis tasks in Python, but this time I have a requirement where I am supposed to automate Excel add inn, where I get a prompt (which comes after installing the add inn), in which I have…
Prateek
  • 185
  • 1
  • 3
  • 12
0
votes
1 answer

Passing SAFEARRAY value to COM client

I am trying to Automate a Tool via win32com.client module which expects the Input to be in the following format,The format shown below if specific to MATLAB. HRESULT StaticStokesParameters([in] SAFEARRAY(double) newVal) I have no clue what does…
Ashesh Nair
  • 317
  • 5
  • 21
0
votes
0 answers

Looping outlook calendar invites with win32com and pandas

I am trying to automate calendar invites with a little script but I keep hitting an error that I just don't understand. I have all the different elements used in the appt in a pandas dataframe and I have been trying to change between datetime and…
Rolf
  • 7
  • 4
0
votes
1 answer

Can't figure out HTML file path formatting

I am trying to send a link to a location on our servers via email, but I can't get the HTML portion of the link to work. This is my file path-- P:\2. Corps\PNL_Daily_Report What I've tried-- newMail.HTMLBody ='
ccraig90
  • 43
  • 7
0
votes
1 answer

Python - Reply to email win32com

I am trying to reply to an email via python and win32com. Below is my code : outlook = win32com.client.Dispatch("Outlook.Application").GetNamespace("MAPI") o = win32com.client.Dispatch("Outlook.Application") inbox =…
Poorva M
  • 43
  • 1
  • 6
0
votes
1 answer

Export Chart to a different Path win32Com

Problem Referring to the code below, whenever I run this piece of code, it will find the charts all the sheets and exporting as an image. However, when it comes to chartObject.Chart.Export("chart" + str(i) + ".png") , it always exports to document…
Shreamy
  • 341
  • 2
  • 16
0
votes
1 answer

Python function for changing the subject line of an Outlook mail item

Is there a Python function for changing the subject line of an Outlook mail item? I have seen solutions for this using VBA. Was looking for a function/ method in python. Thanks Update: Here's what i am trying : import win32com.client as…
Shekhar
  • 33
  • 8