How to Open Outlook in Python?

Rate this post

Problem Formulation

Given a Windows operating system on which you have the Microsoft Outlook email program installed.

How to open Microsoft Outlook using only a function call in your Python script?

Solution: os.startfile(‘outlook’)

The easiest way to open Outlook on Windows using only a short and concise Python One-Liner is to use the os.startfile('outlook') function call from the os module.

import os

This opens Microsoft Outlook on your computer in a separate process:

How to Open Outlook in Python?

You can close it by closing Outlook regularly. You cannot close it by terminating the Python application because it’s already terminated. The Outlook application runs in a separate process independent of your Python app.