Jump to content

Getting body with _OL_ItemFind


Recommended Posts

Hi everybody,

I'm trying to get an email body with outlookex.au3:

_OL_ItemFind($oOL, $mailboxName, $olMail, "", "", "", "Body")

It is working great, but as I use the result in a notepad, all the pictures are replaced by links.

How can I get the body without any picture? The email is in HTML format.

I tried to find a way to convert the email in Text format before getting the body but I couldn't.

Is there another way to do it?

Thanks a lot for any help!

Totochu

Link to comment
Share on other sites

Welcome to Autoit and the forum!

You could use a Regular Expression to remove the Links. Please have a look at StringRegExpReplace.

Edited by water

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

Hi Water, thanks for your reply and your welcome!

I've checked StringRegExpReplace which is a great function.

But here the problem: if I have "normal" links in my email? How can I know which link is part of the body and which one is from a picture? They look the same.

The bad thing is when you have a signature with loads of picture, you will get loads of long links instead.

So maybe just a function to get the body without signature?

Thanks!

Totochu

 

Link to comment
Share on other sites

10 hours ago, Totochu said:

So maybe just a function to get the body without signature?

A signature is just a part of the body.
There is no way determine where the body text ends and the signature starts.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...