Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Currently I am creating a form for my team in which whenever I created a table inside the form, the formatting always loses out when its emailed out using the workflow. It looks fine inside sharepoint.

Would you know why this is happening and if this is possible to rectify? I have tried playing from with the html codes and setting the cellspacing/cellpadding to 0 but to no avail.

This is created in sharepoint 2007 and is emailed to Outlook 2010

Below is the code which i copied from the form

<DIV class=ExternalClassF144FCAB36964753AEEFDEB7F4D47C9B>
<DIV></DIV>
<TABLE style="DISPLAY: inline; BORDER-COLLAPSE: collapse; FONT-SIZE: 1em" border=1  cellSpacing=0 cellPadding=0>
<TBODY>
<TR>
<TD style="VERTICAL-ALIGN: middle" class=ms-rtetablecells;>
<DIV>Log</DIV></TD>
<TD style="VERTICAL-ALIGN: middle" class=ms-rtetablecells;>
<DIV>Issue Description</DIV></TD></TR>
<TR>
<TD style="VERTICAL-ALIGN: middle" class=ms-rtetablecells;>
<DIV>10/10/10 10:10 AM</DIV></TD>
<TD style="VERTICAL-ALIGN: middle" class=ms-rtetablecells>
<DIV>Critical Issue Reported</DIV></TD></TR>
<TR>
<TD style="VERTICAL-ALIGN: middle" class=ms-rtetablecells;>
<DIV>10/10/10 10:10 AM</DIV></TD>
<TD style="VERTICAL-ALIGN: top" class=ms-rtetablecells;>
<DIV>Critical Issue Reported</DIV></TD></TR>
<TR>
<TD style="VERTICAL-ALIGN: middle" class=ms-rtetablecells;>
<DIV>10/10/10 10:10 AM</DIV></TD>
<TD style="VERTICAL-ALIGN: middle" class=ms-rtetablecells;>
<DIV>Critical Isssue Reported</DIV></TD></TR>
<TR>
<TD style="VERTICAL-ALIGN: middle" class=ms-rtetablecells;>
<DIV>10/10/10 10:10 AM</DIV></TD>
<TD style="VERTICAL-ALIGN: middle" class=ms-rtetablecells;>
<DIV>Critical Issue Reported</DIV></TD></TR>
<TR>
<TD style="VERTICAL-ALIGN: middle" class=ms-rtetablecells;>
<DIV>10/10/10 10:10 AM</DIV></TD>
<TD style="VERTICAL-ALIGN: middle" class=ms-rtetablecells;>
<DIV>Critical Issue Reported</DIV></TD></TR></TBODY></TABLE></DIV>

Here is the image of what i get : http://picpaste.com/format-TTKUod2W.JPG

share|improve this question
add comment

3 Answers

A tip I can give you when working with HTML in SharePoint Designer workflows is to get rid of all white space in the email body. If not, emails can be delivered very unappealing. So as bad of a practice as it is in normal web terms, pack the code tightly together once you got it drafted and see if that helps you here.

share|improve this answer
    
Thanks for the tips PirateEric. The email body is absolutely empty as i am pulling the table from the form created. Is there anyway i can remove the whitespace there? I have inserted the code on the original information above. Your thoughts would really help –  alexmclean Feb 7 '12 at 5:26
add comment

In the workflows, when sending html alerts out, I always found that white spacing caused the email to lose its format - no idea why. So I created an email template with no white space which always seems to work in whatever email client is being used.

share|improve this answer
    
Sorry PirateEric, I posted over yours - must have had the editor open when you posted. We agree. –  Paul Leigh Feb 6 '12 at 16:26
    
Hi Paul. Thanks for the reply. When you mentioned you created a email template, is that inside the workflow itself? Since i am pulling the table from inside the SP form itself, would you have any idea how to get rid of the white space there? The workflow email is totally empty with just the lookup of the table inside –  alexmclean Feb 7 '12 at 5:31
    
Unfortunately Alex, I've found the only way is to manually build the table with all the tr, td html tags. It does work but it's a pain the ... to do. –  Paul Leigh Feb 7 '12 at 8:23
add comment

I would say it's the HTML that is the problem. No one has pointed out that it does not follow any HTML standard. This will give your problems in newer Microsoft products that is starting to follow standards more and more.

I would say start inserting " in all the places where it is missing and remove the div elements inside the td's. Div are block elements, block elements will put the next element on a new line.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.