Questions tagged [office-automation]

Use this tag for questions related to automating MS Office Products ( Excel, Outlook, PowerPoint, Access, Word, Project, etc. ). Automation in this context means the use of an external software, not an MS Office product, to execute a variety of operations on MS Office products. For questions about macros use the relevant tags for example "excel" and "vba". Do not use this tag if your question is not about automatic control.

Automation in this context means the use of computer systems to execute a variety of operations such as word processing, spreadsheet calculation, database manipulation, etc. without user interruption.

If you have a specific programming question about Excel or Word (or any other product from the MS Office package) and it is not about automating it via external software then use tags like , , , etc.

805 questions
1
vote
3 answers

How to start Outlook with Python and win32com

I manage to open Outlook Elements like mails or task with this code: import win32com.client as win32 outlook = win32.gencache.EnsureDispatch('Outlook.Application') new_mail = outlook.CreateItem(4) new_mail.Display(True) And its possible to open…
1
vote
2 answers

Change direction of outlook sent email to be from right to left in python

I want to send arabic email using python through win32com, but I want to change the direction of text to be from Right to left in the outlook like in the picture right to left direction in outlook Is there a way to do that through the code ? here is…
1
vote
1 answer

How to properly close Word documents after Documents.Open

I have the following code for a C# console app. It parses a Word document for textboxes and inserts the same text into the document at the textbox anchor point with markup. This is so I can convert to Markdown using pandoc, including textbox content…
1
vote
3 answers

Forward emails from a specifc sender in outlook via python

i try the below code but the attribute error is driving me crazy !, any thing after message. gets me an attribute error, wtv prop. i use. i end up with attribute error. AttributeError: .Sender Code: import win32com.client outlook =…
Martina
  • 43
  • 7
1
vote
2 answers

Python to Forward specific mails with attachments recieved today in outlook

I'm trying to figure out a way to forward emails with attachments received today from " invoice@email.com" to "Remas@email.com". I am stuck in that line, What to put here exactly to let it know that any attachment received from invoice@email.com"…
1
vote
2 answers

How to set an email to 'Seen' in Outlook with WIN32 python?

I have a code, which sends a new email to the chosen recipients. The email is created based on a received email, which is in the inbox. For the email sending I use the Win32 python library. However, since a brand new email is being created, the…
Elod
  • 11
  • 1
1
vote
2 answers

Excel Interop Library Not Working on Azure

Right now ,I am working on Excel Import. It is working fine on my local machine but when I deploy on Azure app services it does not since no access to actual environment where we can install dependencies, Please let me know if there is alternate to…
TAHA SULTAN TEMURI
  • 4,031
  • 2
  • 40
  • 66
1
vote
1 answer

Change column width of Run de Bruin Outlook Mail

I'm using Ron de Bruins code to send a range by e-mail but I haven't figured out how to change the column width of the html range that is sent. I tried to add EntireRow.Autofit & EntireColumn.Autofit which works but I want some columns to be 15 of…
HugoLny
  • 11
  • 5
1
vote
1 answer

How to convert a word document to pdf document using Microsoft Interop library

We are working on file conversions in which I am trying to convert Word document (doc & docx) to PDF file using Microsoft Interop library. Below is the code snippet I've tried implementing. *public string Get() { try …
1
vote
2 answers

python: win32com bulk save attachment error - server admin has limited number of items

I am looping through entryIds stored in a dataframe (loaded from a csv file) and accessing the messages by dispatching win32com.client to access Outlook MAPI and save email attachments to a local directory using the below code. I also am storing the…
1
vote
1 answer

I am having trouble with the Range.PasteSpecial() method in VB.net

I need to copy some data from one Excel workbook to another but I only need to copy values and formats. I don't know any other way of doing this but to use the PasteSpecial() method. The problem is that when I run the code I get this error…
1
vote
1 answer

Is there a fallback for the method Application.ShowMe from Office-Automation?

The method Application.ShowMe from Office-Automation is deprecated. With the last Microsoft Update the call of this method results with 0x800A1088. Is there a fallback for Application.ShowMe() ? or is it sufficient to set the property "Visible" to…
1
vote
2 answers

Outlook has exhausted all shared resources. Why?

With this bit of VBA code in MS Access I'm getting an error if its executed too often. The only way I've found to clear it is reboot my computer. Any idea why and what can I do? Public Function HasOutlookAcct(strEmail As String) As Boolean Dim…
Kwixster
  • 51
  • 8
1
vote
0 answers

Why am I getting this "already open" error when sending an Outlook email template using powershell?

The script I'm using is as follows: # Enter the file path for your csv here # note: there needs to be a header named "userEmail" in the first row $csvArray = Import-Csv "file\path\here" -Filter "file.csv" # Fill out with necessary information, send…
schnondle
  • 121
  • 14
1
vote
2 answers

Automation Outlook to open an Hyperlinks

I'm interested in automating Outlook to check/read mails. I'm using the package win32com with Python to control the app, but I can't find how to open an hyperlink which is in the mail body. Is there an if or for statement that can open the hyperlink…