Adjust text in outlook email body (1 Viewer)

Leo_Polla_Psemata

Registered User.
Local time
Yesterday, 22:39
Joined
Mar 24, 2014
Messages
364
Long story sort,
I have created an access application in which i update a form,
then i extract an excel that is exactly how it should be, i send this excel file as attached email,
then i copy paste the whole excel form and paste on email body

The problem is this, once i paste it, the text, generates an extra line, see image below
While it is just perfectly good looking in excel, i have to delete manually the extra lines from email body.
How could i fix this ?



The method i use to extract excel from access, is described in a previous thread
 

June7

AWF VIP
Local time
Yesterday, 21:39
Joined
Mar 9, 2014
Messages
5,474
Could maybe automate the email from Access code. Text rotation in HTML is proving to be a challenge. I can build table in VBA and embed in message then when message opens to display I can format cell to rotate text. Haven't figured out code to do that in Access VBA.

I tested with db from other thread and don't get extra returns. The pasted third column is not wide enough. I have to manually drag the right column edge to widen and then data fits. I am guessing it has something to do with formatting and mixed fonts in column. Why does your image show rotated text but the output I get does not? It's not even the same data. Should provide your db and your code.
 

Leo_Polla_Psemata

Registered User.
Local time
Yesterday, 22:39
Joined
Mar 24, 2014
Messages
364
Could maybe automate the email from Access code. Text rotation in HTML is proving to be a challenge. I can build table in VBA and embed in message then when message opens to display I can format cell to rotate text. Haven't figured out code to do that in Access VBA.

I tested with db from other thread and don't get extra returns. The pasted third column is not wide enough. I have to manually drag the right column edge to widen and then data fits. I am guessing it has something to do with formatting and mixed fonts in column. Why does your image show rotated text but the output I get does not? It's not even the same data. Should provide your db and your code.
Hi, my "problem" is the extra lines between first line "plastic fruits S A" and second line "Redmond"

In access form, the data is as below

Plastic fruits SA
Redmond
Washington
98052-6399
USA

When i export in excel, the data i see is the same format

When i copy paste from excel and paste on the email body i get

Plastic fruits SA

Redmond

Washington

98052-6399

USA


Then I have to delete manually the extra lines and bring it to normal view.
No big deal, however, in few cases, due to workflow rush, i deleted part of the data as well.

So, i wonder, what forces another extra line and if i could fix this from VBA level or it is an issue from windows options or what.
 

June7

AWF VIP
Local time
Yesterday, 21:39
Joined
Mar 9, 2014
Messages
5,474
I don't know because I don't have your data nor your code. As I said, db from other thread does not exhibit this issue.
 

ebs17

Well-known member
Local time
Today, 07:39
Joined
Feb 7, 2020
Messages
1,946
i have to delete manually the extra lines from email body
Load the content of the (HTML)body into a string variable, identify your table (graphic), find the line breaks and eliminate them, then write the string back into the body. Remember that HTML uses different line breaks.

I'm very close to @June7 on one flow, though. For this structure, I would create an HTML template for myself, complete it directly in Access with the data, and paste the whole thing into the mail.
The detour via Excel is at least more runtime intensive.
 

Gasman

Enthusiastic Amateur
Local time
Today, 06:39
Joined
Sep 21, 2011
Messages
14,310
Inspect the source of a completed email and use Replace() to remove the offending tag.?
 

Users who are viewing this thread

Top Bottom