html - colspan not working (1 Viewer)

bignose2

Registered User.
Local time
Today, 16:10
Joined
May 2, 2010
Messages
219
Hi,

I have Access getting imap emails for me via Chilkat ActiveX

basically I get the html email body OK & generally looks fine for normal email.

However I get SMS/text messages via a online service and they have a rather fancy format with columns.

Looks nice in email cilents & any other html viewer but when I receive into my database it keeps colours & bold etc but no columns so actually makes it very difficult to view.

I think it is the ' td colspan="2" ' etc than gets lost

Do you know if MsAccess (365) should be able to cope with colspan.
I could search/replace but not sure what to put in its place, a New Line would not help much as 3 columns wide actually splits the data.

I know very vague but hoped someone might be able to start me get me started in the right direction. I did wonder if UTF-8 & iso-8859-1 could be a issue but not sure makes any difference with the editing. I think generally I use UTF-8 to send but looking below lots on incoming seem to use iso-8859.


e.g.
<html><head><META http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
</head><body>
<table width="100%" border="0" cellspacing="5" cellpadding="0">
<tr>
<td colspan="2"><font face='Arial, Helvetica, sans-serif'><b><font color='#000000'>You have a new<i><font color="#FF0000"> </font></i>message.<br>
 

plog

Banishment Pending
Local time
Today, 10:10
Joined
May 11, 2011
Messages
11,638
Really need to see the rest of the table html to see if its colspan. Can you post the rest of the html down to the closing table tag?

From what I see you have an unopened italics tag and the font tag is how our grandfathers formatted text back in WWII.
 

bignose2

Registered User.
Local time
Today, 16:10
Joined
May 2, 2010
Messages
219
<html><head><META http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
</head><body>
<table width="100%" border="0" cellspacing="5" cellpadding="0">
<tr>
<td colspan="2"><font face='Arial, Helvetica, sans-serif'><b><font color='#000000'>You have a new<i><font color="#FF0000"> </font></i>message.<br>
</font></b><font face='Arial, Helvetica, sans-serif'><i><font color='#999999'>Tip: Remember to end your message reply with ##<br />
For more information on settings please see our <a href='http://www.textmarketer.co.uk/blog/2011/02/documentation/using-the-txtus-2-way-text-messaging-feature/'>help document</a></font></i></font></font></td>
<td><div align="right"><img src="http://www.textmarketer.co.uk/img/TxtUsLogo_mini.gif" width="114" height="40"><br>
<font face="Arial, Helvetica, sans-serif">by <a href="http://www.textmarketer.co.uk">Text Marketer</a></font> </div></td>
</tr>
<tr>
<td colspan="3"><hr></td>
</tr>
<tr>
<td width="25%"><b><font color='#555555' face="Arial, Helvetica, sans-serif">FROM:</font></b></td>
<td width="50%"><b><font color='#555555' face="Arial, Helvetica, sans-serif">MESSAGE:</font></b></td>
<td><b><font color='#555555' face="Arial, Helvetica, sans-serif">DATE/TIME:</font></b></td>
</tr> <tr>
<td><font color="#990000" face="Arial, Helvetica, sans-serif">44770123456</font></td>
<td><font color="#990000" face="Arial, Helvetica, sans-serif"><b>Test Line One</b></font></td>
<td width="25%"><font color="#666666" face="Arial, Helvetica, sans-serif">16-05-18 16:27</font></td>
</tr> <tr>
<td><font face="Arial, Helvetica, sans-serif">YOU</font></td>
<td><font face="Arial, Helvetica, sans-serif"><b>Test Test Test Test End of Test line</b></font></td>
<td><font color="#666666" face="Arial, Helvetica, sans-serif">16-05-18 16:26</font></td>
</tr> <tr>
<td colspan="3"><hr>
<p><font color='#999999' face='Arial, Helvetica, sans-serif'>-- END OF DISCUSSION --<br />
<i>To increase the number of messages included in your discussion history please see our <a href='http://www.textmarketer.co.uk/blog/2011/02/documentation/using-the-txtus-2-way-text-messaging-feature/'>help document</a>.</i></font> </p>
<p><font face="Arial, Helvetica, sans-serif">You can reply to this person by text. Simply hit reply to the email, type the message you want to send and then <strong>##</strong> at the end. All the text up to the ## will be sent back to this person's mobile instantly. </font></p>
<p><font face="Arial, Helvetica, sans-serif"><b>Text Marketer Ltd</b><br />
Web: <a href='http://www.textmarketer.co.uk'>http://www.textmarketer.co.uk</a><br />
Tel: 0117 205 0202<br />
Fax: 0870 458 0383</font></p></td>
</tr>
</table>
</body>
</html>


The middle section have 3 columns - data not as above just made up
FROM: MESSAGE: DATE/TIME
123456 Hello 16-05-18
How Are You
Today
You I am OK 18-05-18


Comes out bit like below - does have colours & bold etc, just no colums

by Text Marketer FROM:MESSAGE:DATE/TIME:447709998675Many thanks Peter16-05-18 16:27YOUHi, I am pleased to confirm Booking BLAZE Mon 21-May-18 To Mon 21-May-18. Regards. Jack.16-05-18 16:26
-- END OF DISCUSSION --
 

bignose2

Registered User.
Local time
Today, 16:10
Joined
May 2, 2010
Messages
219
Not that clear as forum seems to remove the spaces
 

bignose2

Registered User.
Local time
Today, 16:10
Joined
May 2, 2010
Messages
219
FROM:...... MESSAGE:.......... DATE/TIME
123456..... Hello..................16-05-18
.................How Are You
................Today
You........... I am................ OK 18-05-18
 

plog

Banishment Pending
Local time
Today, 10:10
Joined
May 11, 2011
Messages
11,638
It all looks good to me--I thought you might have snuck in an extra or missed a <td> in another row or forgot a closing tag, but its all correct.

My only recommendation is to not use colspan---take that data out of the table and put that data in their own divs and spans and hopefully you can control it that way--making it float correctly to get the spacing right.
 

bignose2

Registered User.
Local time
Today, 16:10
Joined
May 2, 2010
Messages
219
Hi,

Many thanks for your reply,

This is exactly how I receive the message, including the colspan html

I might be able to search/replace and put in different fields as you say but initially looks really tricky to decide what is the number, message & date/time.

Mostly are normal emails which are fine but Texts/SMS's are increasing so I may have to think of something as is tricky to read especially when there are several threads.

Do you think that MSAccess does not handle this html code well or at all?

Thanks again
 

plog

Banishment Pending
Local time
Today, 10:10
Joined
May 11, 2011
Messages
11,638
Do you think that MSAccess does not handle this html code well or at all?

I don't really understand--are you trying to view HTML within Access? How?

HTML is just a string of text that let's whatever is displaying it, how to display it. So, if its not being displayed correctly its the displaying device that's at fault, not the sending device.
 

bignose2

Registered User.
Local time
Today, 16:10
Joined
May 2, 2010
Messages
219
Yes,

I have RTF memo field, table & on a form.

the field on the form is RTF format (I know they call it RTF but really html)

The data is imported from the incoming email, I can see all the html code if I view in a text box with plain text properties but the same table data views in a RFT text box shows with all the formatting.

99% of time looks fine, it is just this table layout
 

Users who are viewing this thread

Top Bottom