InfoPath Rich Text Fields and “stuck” formatting

I’ve been working on an odd problem off and on for the last little while.  My organization uses a customized electronic forms workflow system based on Microsoft InfoPath 2007 to manage forms, policy documents, manuals, etc etc, to control the authoring and revision process.  The InfoPath templates we use include several Rich Text fields that allow the user to format the policy/instructions/etc nicely with all the headings, lists, styles that their little hearts desire.  Usually what this means however, is that they are copying blocks of text out of an existing Word document that they’ve drafted, and pasting it into the InfoPath template. 

Usually this is not a problem, and everything does smoothly. However, for larger documents, I’ve found that InfoPath’s rich text fields have a hard time … umm … “digesting” more complex blocks of rich text.  Sometimes you paste in a large block of formatted text, you save or submit the document, and then the next time you load it using the template, everything comes back bold, or everything comes back underlined, or something really wacky happens with the text.  The *really* great part is that it’s almost like the formatting becomes “stuck”, you try to undo the bold for a selection of text, and it won’t let you! 

I’m pretty sure this has something to do with all the invisible formatting junk that comes along for the ride when you copy and paste text from Word into InfoPath.  A quick look at the source xml shows beautiful stuff like this:

<font style=”FONT-SIZE: 11pt”/></ul></ul></ul></font></font></font>
</div></div><div><div><font face=”Calibri”><font face=”Calibri”>
<font face=”Calibri”><font style=”FONT-SIZE: 11pt”>
<font face=”Calibri”><font style=”FONT-SIZE: 11pt”><strong><strong>
</font> </div></div></font></font>

What a giant mess.  This was found at the end of a block of text that was pasted into the rich text field.  The only solution I have found is to first copy the text from Word into NotePad, which strips out all of that crap, then pasting it into InfoPath, and spending a bit of time to re-do the formatting.  It’s tedious, but necessary for larger, more complex documents.


0 Responses to “InfoPath Rich Text Fields and “stuck” formatting”

  1. Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s


%d bloggers like this: