Newest 'win32com' Questions - Stack Overflow

Questions tagged [win32com]

win32com is a Python module to interact with Windows COM components.

0
votes
0answers
9 views

import Win32com.client terminate

When I run following code row by row in cmd, it will go through successfully. When I want to run by double click from folder if terminate after import win32com.client I'm completely newbie in python :...
0
votes
0answers
11 views

com_error “Server execution failed” for Dispatch(“Photoshop.Application”)

I use win32com.client.Dispatch to manage Photoshop on a Windows server, I configured the address to connect to this server and now when I send a request from my local machine to the server, win32com....
0
votes
0answers
15 views

Is there a way to programmatically reject changes to a word document using python, while not deleting comments from it?

I have old version of a few word documents (word document with '.doc' extension) all of which have a lot of tracked changes in them. Most of the changes have comments associated with them. I need to ...
0
votes
0answers
12 views

Excel with Python win32com How to open and close and save Excel's changes so Outlook preview works

I'd like my emailed excel files to properly show all the chart lines in the Outlook preview. (I think Excel needs to open and perform the formula's so the results can be charted, and Outlook preview ...
0
votes
0answers
13 views

How to change the Credentials for Outlook while reading mails from python?

I am trying to make an email bot which will read the emails and reply on it's own. For this i was using the python through MAPI.How does the authentication work while reading emails from outlook since ...
1
vote
0answers
20 views

Why does AccessibleObjectFromWindow() only work on Microsoft Office applications?

I'm trying to obtain the COMObject of an already running application. I have been able to obtain the hwnd and after running AccessibleObjectFromWindow with the correct parameters I get the error: ...
1
vote
0answers
16 views

Mass converting xlsb to csv consuming too much memory using win32com

I skeletonized some code to convert certain sheets of xlsb files to csv files and am using this function to iterate over a path list and converting >200 files to csv. import os import win32com....
0
votes
1answer
33 views

Select all elements of a listview in pywinauto using send_message

Need help to select all elements of a listview using send_message. I want this to work in RDP disconnected mode and hence using pywinauto's send_message api. My code from pywinauto import ...
0
votes
1answer
15 views

how can i import win32com module in webcompiler (ide.goorm.io) in linux develop envilonment,

import error in webcomfiler Goorm Linux Envirenment. I find python library directory and mv win32com folder.(https://sourceforge.net/projects/pywin32/)-unzipfile and excute command_ python setup.py ...
0
votes
0answers
17 views

Visibile property of Power point application in win32com under python is not working when set to false

The visible property of Powerpoint application in the win32com package under python is not working when set to 'False'. It was working when the visible property was set to true and the pptx gets ...
0
votes
1answer
21 views

Add email address to outlook distribution list

I have a distribution list under "Global Address List". I want to read the members of that group and add new members to the same distribution list. Is there anyway to do that in python using win32com? ...
1
vote
1answer
23 views

how to copy the contents of an excel sheet and paste it in the body of an email.(Not as an attachment) using Python

I'm writing a python script to send email. Right now it is sending an excel file as an attachment, but instead I want to send the email with the body having the contents of the excel file. Like ...
0
votes
0answers
13 views

How do I remove/delete queries and connections from Excel workbook with Python/win32

I have a Python script using win32 to modify, refresh sources, save, and email an Excel workbook. I want to disable or delete the queries and connections used in the workbook prior to saving and ...
0
votes
1answer
16 views

Listing Available Message Attributes with win32com.client

I have a directory with hundreds of Outlook emails stored in .msg format. I have a script to access specific attributes, e.g. SenderName, Subject etc, however the script fails upon certain files. ...
1
vote
0answers
39 views

Automating Simple Photoshop with Python

The business I work for creates laser engraved custom products. The engraver machine requires files to be in the psd format. Our website enables users to select a template and enter in what text they ...
0
votes
1answer
24 views

Trying to export email body in excel

I have a list of email that I would like to export the subjects and the body information to take other actions with it. I've been able to extract the subject however the body stays empty. I would ...
0
votes
0answers
8 views

Is possible to disable Excel's Document Inspector with Win32Com?

I'm using python to open an XLSX file, add a Macro and then saving it to XLSM. Everything works fine, except that when i try to call the Quit method of the application or Close a workbook, Excel ...
0
votes
0answers
33 views

Python scripts gives different results when run through Task scheduler

I created a batch file to run a python script. The script runs fine when I run it by double clicking the batch file but gives me different result when I run it through the task scheduler. The script ...
-1
votes
2answers
35 views

Problems with win32com

I have the following error in my code, I have tried everything and I can not solve: 1° Not Successful excel = win32com.client.Dispatch("Excel.Application") wb = excel.Workbooks.Open(os.path.join(os....
0
votes
0answers
9 views

Access data in Excel Add In, S&P MI from python

I have been using S&P Market Intelligence excel add-in to extract data. Now I'm trying to use the following python code to access S&P MI add-in, so I can get rid of Excel. from win32com....
0
votes
0answers
14 views

Has anyone tried running macro embedded in a microsoft word document from Python

I have a macro in word 2013, that removes white spaces and adjust page width size to ensure the tables fit. Currently, in order to make these changes to the document, the user needs to run the macro ...
0
votes
1answer
36 views

Downloading Email Attachments with Python - When there's more than one attachment

I have code that searches through a group Outlook inbox based on a certain criteria and retrieves the date and time of emails satisfying the specified criteria. This code also downloads the first ...
0
votes
1answer
23 views

How to bypass finish message while automating excel macro

I am trying to automate an excel macro using the following code. However the close line did not execute. This might be caused by an auto-displayed finish message of the macro (which asks me to click ...
-1
votes
0answers
27 views

Formatting not reflecting of html file for Outlook application

I have one excel sheet containing information of few transactions. I converted the excel sheet to html(save as html) using Excel (win32com) Applications utility. Now I embedded the excel in outlook ...
0
votes
0answers
18 views

Why doesn't Python action all the mails at once when reading Outlook mails via win32com.client?

I am using win32com.client module to read mails via Outlook. I'm unable to action all the mails that are returned at once due to pywintypes.com_error. Here is the code: def moveMails(self): ...
0
votes
0answers
5 views

Is Win32Com reloading modules something to be concerned about?

I'm formatting a bulk number of Excel 2010 documents with a Python script. The Python script is using Win32Com and Pandas. Twice now, I've tried to format files that don't exist. When that occurs, ...
0
votes
0answers
24 views

Insert field with page number in MS Word table using Python (win32com)

With the use of Python (win32com) I want to insert a user defined page number in a table cell of MS Word. Normally in Word if I want to have custom page number different from standard PAGE variable I ...
1
vote
1answer
35 views

Cannot open read-only Microsoft Word files with win32com.client

I have thousands of docx files of which I need to extract certain elements of via a Python. I am using a win32com.client in my Python script to accomplish this task. import win32com.client doc = ...
0
votes
0answers
14 views

How to add multiple charts from pivot tables in python?

I am trying to create more than one pivot charts in excel using win32com.client. For that I am using Shapes.AddChart2 to add a pivot chart, but the problem is if I have more than one pivot table, then ...
0
votes
1answer
60 views

How to fix `pywintypes.com_error` in Python

I'm trying to get this program running. I uses Python 3.7.2 in Win10 Enterprise (Version 10.0.17763 Build 17763) and the system is based on 64 bit. I tried to make it work on several PCs. On some ...
0
votes
0answers
21 views

reading outlook mailbox and get two consecutive email having same subject

iam trying to read an outlook mailbox and select two consecutive(today and yesterday) emails which have a given subject line. have been able to get the first email correctly but second(immediately ...
0
votes
1answer
14 views

Refresh outlook inbox via python script

I'm trying to read emails from the outlook by means of win32com. It's working well only if the email are displayed in outlook desktop application. But it could de something in the server, which could ...
1
vote
1answer
34 views

How can I iteratively modify excel filetypes using win32com and os?

I am trying to iterate over a directory that contains a number of xlsm (Macro-enabled excel) files, opening each file and saving as an xlsx file. Ideally, I would have three directories, one that ...
1
vote
1answer
31 views

How can I save as the document as .psb file using win32com.client in python?

In photoshop and using python, I cannot save the active document as PSB (Large Document Format) file With win32com.client, I can save active documents as .psd files like this: from win32com.client ...
1
vote
0answers
13 views

How to freeze the top row in an Excel using WIN32COM python package?

How to freeze the top row in an Excel using WIN32COM python package? Searched almost everywhere, but could find examples with other packages, but not with "from win32com.client.gencache import ...
0
votes
1answer
44 views

Register a 32-bit COM class for use in 64-bit Python without Administrator rights

I'm making a Python script that uses SAP's GUI scripting API through win32com. The first usage is like this: from win32com.client import Dispatch objWrapper = Dispatch("SapROTWr.SapROTWrapper") This ...
0
votes
0answers
21 views

Python Is there a way to send email to existing mailing list?

So I am writing a python script to send an email out once the script finishes running. I want to be able to send it to a group. For example, we have a mailing group of "IT". Currently in my code ...
0
votes
0answers
17 views

How to read digitally signature email in python

My goal is to move mail from specific people to other folders in outlook. this can be achieved using Rules options, but i want to run script on required basis to move emails periodically. Am using ...
1
vote
0answers
35 views

How to make web browser automation tool using Python and Win32

I'm pretty new about programming and I'm making an web browsing automation tool using Python and Win32. What I want to do is input keyword in Google and click search button, but I couldn't click any ...
0
votes
1answer
35 views

How to refresh excel using python

I need to evaluate a function within excel using python right after writing that function into excel with xlsx writer or openpyxl. I need to pull the number generated by this function back into python ...
1
vote
0answers
53 views

Window isn't active when opening powerpoint file with pywin32

I tried to open an existing file of powerpoint with pywin32 however this code couldn't do window active. Do you have any ideas for this problem ? import win32com.client file_name = r'your file path\...
0
votes
1answer
32 views

Saving Excel file from python script using win32com library

I am using win32com.client library to open xlsm file and save it to xls file. Yes I know some may raise the question that saving to old format should not be done but that is the requirement of the ...
0
votes
1answer
47 views

How to set title to a powerpoint slide using win32com client

Could anyone please help me in setting a title to a powerpoint slide using win32com library in Python. The following is the code. I have used the slide layout 11 which denotes Title only import ...
0
votes
0answers
8 views

How to handle .doc corruption and password protected .doc files in python

I have a folder with 20,000 .doc/docx files in it. I needed to convert all of these to .pdf. I decided to go to python to achieve this and was able to put together a quick and dirty code to achieve ...
0
votes
0answers
35 views

How to copy the records from excel sheet to a power point pptx using python code

Could anyone please let me know how I can copy the records from an excel sheet to powerpoint presentation using python code. The libraries which I had used were win32com.client and python-pptx. The ...
0
votes
1answer
36 views

Side effect when copying .xlsx sheet to different excel file

There are several ways to copy an excel (.xlsx) sheet to another existing excel file. As i have to deal with sheets containing formatted form objects (colored text boxes, lines, ...), the only working ...
0
votes
1answer
20 views

Python3 Win32com Copy body of an email and paste to a new excel file

I'm trying to copy paste an html table received by outlook email to a new excel spreadsheet but I get a "pywintypes.com_error." Seeking a more pythonic way to do a the equivalent of a "Control+A" on ...
1
vote
0answers
26 views

How can I specify a post-uninstall script for a Python package with setuptools / pip?

I'm creating a Python package that registers a COM server after install using the approach described in Post-install script with Python setuptools. How can specify a post-uninstall (or pre-uninstall) ...
1
vote
0answers
17 views

python win32com client, how to switch between different installed versions of an application?

I am using the win32com client to automate a task in another application (of which I have multiple versions installed). It seems that if I use e.g.: win32com.client.Dispatch('myApplication') It ...
0
votes
0answers
24 views

How to Save Attachment from a latest particular email using Python

There are thousands of email and I want Attachments of one particular email with a fixed subject line gets saved to current working directory when I run the script. I have already tried reading few ...