Copy content of one Rich Text Box to another Rich Text Box - Lose Formatting - InfoPath Dev
in

InfoPath Dev

Copy content of one Rich Text Box to another Rich Text Box - Lose Formatting

Last post 04-21-2014 08:37 AM by Jimmy. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 04-03-2014 12:50 PM

    Copy content of one Rich Text Box to another Rich Text Box - Lose Formatting

    In my InfoPath 2010 Filler Form, I have a repeating section (called 'Security') which contains a Rich Text Box (called 'Description') that has a data type of "Rich Text (XHTML)".

    In another repeating section (called 'Request'), there's a drop down list (called 'SecuritySelection') that is populated with all of the entries from the previous repeating section (from 'Security').  When the user makes a selection for 'SecuritySelection', an action rule is executed which copies the rich text from 'Security'|'Description' to another Rich Text Box (called 'RequestDescription').  'RequestDescription' also has a data type of "Rich Text (XHTML)".

    When I display/print the 'RequestDescription' rich text box, all formatting has been lost.  I would expect that when you copy data from one rich text field to another that any formatting present would stay in place.  However, that doesn't appear to be the case in this situation.

    Is there a no-code solution to maintain the formatting?  Is there maybe a form setting that could be set incorrectly?

    Thanks in advance.

  • 04-16-2014 11:00 AM In reply to

    Re: Copy content of one Rich Text Box to another Rich Text Box - Lose Formatting

    After performing additional research, it appears a no-code solution is not possible.  So now I'm attempting to add some VB code via VSTA.  My VB skills aren't very good.  What would be the syntax for copying formated text from 1 field to another?

    Thanks.

  • 04-21-2014 08:37 AM In reply to

    Re: Copy content of one Rich Text Box to another Rich Text Box - Lose Formatting

     Rather than writing your own code, which can easily turn into a big maintenance hassle, I recommend trying qRules. It has a CopyRichText command specifically for this purpose and will have you up and running in no time.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.