Assigning values to a Rich Text Box - InfoPath Dev
in

InfoPath Dev

Assigning values to a Rich Text Box

Last post 08-01-2010 02:21 PM by Potemkine. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 07-28-2010 09:46 PM

    Assigning values to a Rich Text Box

    In my infopath20-03 application I have Rich Text Box.Using a web service I am retrieving values from the oracle data base.In the data base I have a text value already save from another rich text box.The value the database is saving with the HTML tags. I need to display that value with out HTML tags and with the formats. Is there a way to do that

    Filed under:
  • 08-01-2010 02:21 PM In reply to

    Re: Assigning values to a Rich Text Box

     Hi, I suppose you use Vb script.

    Here some code that can help you:

    Dim oItem, oParent, oPrevious, temp

    Set oItem = XDocument.DOM.selectSingleNode("/my:XMLTOPUTHTML")

    Set oParent = oItem.parentNode

    Set oXML = CreateObject("MSXML2.DomDocument.5.0")

    oXML.async = false 

    MyHtml= "Your htmlCode"

    oXML.loadXML("<?xml version=""1.0"" encoding=""UTF-8""?><my:XMLTOPUTHTML><div>"&MyHtml&"</div></my:XMLTOPUTHTML>")

    oXML.setProperty "SelectionNamespaces", "xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xhtml=""http://www.w3.org/1999/xhtml"" xmlns:dfs=""http://schemas.microsoft.com/office/infopath/2003/dataFormSolution"" xmlns:my=""YOUR My:Schema"" xmlns:xd=""http://schemas.microsoft.com/office/infopath/2003"""

    Set row = oXML.selectSingleNode("my:XMLTOPUTHTML")

    oParent.replaceChild row, oItem 

     Hope it's help.

Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.