Example Code

Search Outlook Email and Retrieve an Email's Subject, Body, and Return Address

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

Overview
This example VI provides an interface that will search for emails within your Outlook inbox that contain user-specified key words in the email's body.  


Description
This example VI provides an interface that will search for emails within your Outlook inbox that contain user-specified key words in the email's body. The VI will then return an array consisting of the resulting emails that meet the search criteria. The resulting array contains the subject, body, and sender email address for each email.

 

 
Requirements

  • LabVIEW 2012 (or compatible)


Steps to Implement or Execute Code

 

Additional Information or References
VI Block Diagram
5-58.png

 

 **This document has been updated to meet the current required format for the NI Code Exchange.**

 

 

Huntington W
National Instruments
Applications Engineer

***Don't forget to give Kudos and Accepted as Solution where it is deserved***

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
Luong.Tran
Member
Member
on

Hi all

How to retrieve the attrachment file!

Do you have any example codo to download the attrachments file from outlook?

Best Regards

Luong.Tran

PJackson
Member
Member
on

Same question...  Does anyone know how to view/extract an attachment from an email received.