Hi,
I wan't to copy in c# code the rich text field(RTF) in the Secondary data source(SDS) to my RTF in the Primary data source (PDS) without lost my formatting! Is it possible?
What I have try:
IXMLDOMNode jean = oDomSearchHRG.selectSingleNode("/tabMuster/Muster/Text[position()=1]");
IXMLDOMNode jean2= thisXDocument.DOM.selectSingleNode("/my:myFields/my:group3/my:group4/my:field9");
jean2.parentNode.replaceChild(jean, jean2); That make me an error because the node is Text in the SDS and my:field9 in the PDS.
or
jean2.replaceChild(jean, jean2);
that make me this error:
quote:
System.ArgumentException
Insert position Node must be a Child of the Node to insert under.
at Microsoft.Office.Interop.InfoPath.SemiTrust.IXMLDOMNode.replaceChild(IXMLDOMNode newChild, IXMLDOMNode oldChild)
at Microsoft.Office.Interop.InfoPath.SemiTrust.DOMNodeWrapper.replaceChild(IXMLDOMNode newChild, IXMLDOMNode oldChild)
at Microsoft.Office.Interop.InfoPath.SemiTrust.DOMNodeWrapper.replaceChild(IXMLDOMNode newChild, IXMLDOMNode oldChild)
at testmuster.testmuster.field9_OnAfterChange(DataDOMEvent e)
in c:\documents and settings\tc\bureau\st gallen\visual studio
projects\testmuster\formcode.cs:line 50
at Microsoft.Office.Interop.InfoPath.SemiTrust._DataDOMEventSink_SinkHelper.OnAfterChange(DataDOMEvent pDataDOMEvent)
How can I proceed to copy my value with my formating (bold, strike, color, etc (no table ,no image))?
Thanks in advance
++
Thierry
Every moment hesitated is a moment gone for life!!! Think about it
Infopath 2007, Langage: C#2.0 (Modèle Objet 2003)
merci de lire ceci