cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
gmaasz
Resolver I
Resolver I

Is there a way to extract text from an HTML email where you still have the line breaks included?

Is there a way to extract text from an HTML email where you still have the line breaks included? When I use the HTML to Text function, it removes line breaks and puts my bullet points in 1 line. Would just like to get the data in the correct format.

5 REPLIES 5
VJR
Memorable Member
Memorable Member

Hi @gmaasz 

 

Would you be able to share some screenshots as to what your inputs and outputs are showing up as.

 

If the input email is 

VJR_2-1632979667879.png

 

 

 

the Html to Text shows as below

 

VJR_0-1632979552810.png

 

gmaasz
Resolver I
Resolver I

@VJR thanks for the reply. This is correct in the example. The issue is that when you want to use the plain text output somewhere else, like saving it in sharepoint or ailing it to yourself, then it has no formatting applied and the bullet points will be next to one another.

VJR
Memorable Member
Memorable Member

Is there a possibility of taking the line break tags for eg <BR> before converting from html to text, then replacing them with some placeholder character like [*linebreakhere*]

and then later when its the right time add an actual line break wherever there is [*linebreakhere*] present.

Seems lika a plausible solution. Would you maybe be able to assist with an example of how to do this? 🙂

VJR
Memorable Member
Memorable Member

Hi @gmaasz 

There are several factors which will determine whether or not you can go ahead with this approach or not depending on how big or small your email text is, what are its contents, etc.

Also what is the html showing up at the place where there are line breaks, is it a html <BR> tag or anything else.

 

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (2,145)