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
1 answer

Read Outlook Shared Calendars via Python

Using Python, how do you read Outlook's Shared Calendar events, and hopefully, also using a time filter?
MinneapolisCoder9
  • 601
  • 1
  • 11
  • 29
0
votes
1 answer

How get folder other than default folder of outlook using pywin32

I try to make an alert mail report dashboard/report using python's pywin32 library(I'm new into this), so I'm trying to fetch the details like time of an alert mail that has been set up in some different folder other than the default inbox…
0
votes
0 answers

PyInstaller raises ValueError because of win32 compat module

I'm trying to create an EXE file from a Python script that contains win32com module with PyInstaller, but a ValueError is raised on execution. I wrote in command prompt window the following command line to figure out why it doesn't work: pyinstaller…
shira1954
  • 21
  • 4
0
votes
1 answer

Accessing task completion status in PowerPoint

I am trying to produce an application (in Python, as it happens, though using COM objects as in VBA) to export a PowerPoint presentation to a video. This is easily done using the SaveAs method, as…
tecwhizz
  • 5
  • 1
0
votes
1 answer

outlook autocomplete emails in python

I have a list of IDs that I need to turn into emails, but all of the addresses are the same, but all the IDs are unique. If I was in outlook I could just press ctrl K and have the address autocompleted. Is there a way to have similar functionality…
jvvon
  • 29
  • 4
0
votes
2 answers

Python to retrieve Outlook email user profile

Is there a way to read the Outlook user's profile information, for example job title, Department, telephone number, and reporting manager, by given an email address? For example I have 5 email address (internal user in the same company) I want to…
Mark K
  • 8,767
  • 14
  • 58
  • 118
0
votes
2 answers

How to read only the 1st email body of the msg file, excluding the mails that are attached to that msg file

I am currently trying to figure out how to parse all the msg files I have stored in a specific folder and then save the body text to a dataframe but when I'm trying to extract the body of the emaill it is also extracting the emails that are attached…
0
votes
2 answers

Send e-mail while Looping though dictionary

I'm trying to send multiple e-mails with different file attachments in each one. Like this: file_A go to mail_a@mail.com file_B go to mail_b@mail.com ... I tried this code, but when I'm looping though the dictionary all of my e-mails goes to…
0
votes
1 answer

failed to install win32gui

I tried installing win32gui from pip and i get this error, any fixes? any issues? i think we have to install some other module before installing this?im not sure. im using python 3.7. pls help, thanks in advance :) Code : pip install win32gui Error…
Delrius Euphoria
  • 14,910
  • 3
  • 15
  • 46
0
votes
0 answers

Why win32com.client dont work after successful installation?

I'm working on project in python, and I need to get access to Outlook. I tried every solution that was suggested in the past questions on that topic, but nothing works. Installed pywin32 and pypiwin32, they appear in pip list. But still cant import…
0
votes
0 answers

Can we copy a dataframe, with rows and cols >1, into an excel sheet?

Here's the code I am using excel = win32com.client.Dispatch('Excel.Application') wb = excel.Workbooks.Open('myWorkbook.xlsx') df = pd.DataFrame({'A':[1,2,3,4,5], 'B':[11,22,33,44,55],…
Aroosh Rana
  • 112
  • 11
0
votes
1 answer

Read excel sheets in workbook and write to word

I am trying to use python to read each sheets in excelworkbook and to write to existing word document. Code snip as below: from win32com import client excel = client.Dispatch("Excel.Application") word = client.Dispatch("Word.Application") doc =…
0
votes
1 answer

wincom32.client.Dispatch not working after upgrade to Python 3.8

I just upgraded to Python 3.8.2. Following the upgrade I reinstalled a few packages that I use frequently by python -m pip install --upgrade pip pip install -U wxPython pip install pywin32 pip install python-vlc pip install PyAutoIt Now I find that…
0
votes
2 answers

Using win32com.client library, unable to create PivotTable from PivotCache created using range in some other workbook

I am trying to create a Pivot Table in workbook named "Model.xlsx" using PivotCache created from dataRange in other workbook named "Reports.xlsx" When I create the Pivot Table in the same workbook (Reports.xlsx) from which dataRange is created then…
0
votes
3 answers

Trying to open an excel using a python code

HI am trying to open an excel using python codes on windows (python version is 3.6.10) I used codes from the link Running an Excel macro via Python? import win32com.client as wincl excel_macro = wincl.DispatchEx("Excel.application") excel_path =…
user13412850
  • 509
  • 1
  • 5
  • 16