Ok...I wrote the code to encode but I receive the following error:
'#PCDATA' is in nil content: <{http://schemas.microsoft.com/office/infopath/2003/myXSD/2005-10-14T02:45:00}frmSignature>.
at Microsoft.Office.Interop.InfoPath.SemiTrust.IXMLDOMNode.set_text(String value)
at Microsoft.Office.Interop.InfoPath.SemiTrust.DOMNodeWrapper.set_text(String value)
at DHS2565.DHS2565.btn_CreateNewForm_OnClick(DocActionEvent e) in \\Lsasgm01\gmforms\2565\DHS2565\DHS2565\DHS2565\FormCode.vb:line 75
at Microsoft.Office.Interop.InfoPath.SemiTrust._ButtonEventSink_SinkHelper.OnClick(DocActionEvent pEvent)
Here is my code:
Dim srcBT As Byte()
Dim dest As String
Dim srcFile As String = ""
srcFile =
"C:\Documents and Settings\bfadmin\Desktop\signature.bmp"Dim sr As New IO.FileStream(srcFile, IO.FileMode.Open)ReDim srcBT(sr.Length)
sr.Read(srcBT, 0, sr.Length)
sr.Close()
dest = System.Convert.ToBase64String(srcBT)
thisXDocument.DOM.selectSingleNode(
"/dfs:myFields/my:frmSignature").text = dest
Thanks a ton!
William L Fringer
Database Administrator/Systems Integration Specialist
L&S Associates, A Human Arc Company
Phone: 800.766.6185, x6605| Fax: 800.698.2877
3245 Technology Blvd | Lansing, MI 48910
[email protected] | www.lsaservices.com