
Signature
Sandeep
www.autonomysystems.com
Thank you for the help. I am sure I am still doing something wrong.
If I copy the statement in as written I get an error on XDocument.dom that
says "Reference to non-shared member requires an object reference.
And I am nit sure what my xpath should say. The form name is
Project_Approvals and the Field name is Approver_name so should it be. /my:
Project_Approvals/my:Approver_Name
Thank you for the help. I really appreciate it.
Here is all the code.
Public Sub _Startup(ByVal app As Application, ByVal doc As XDocument)
thisXDocument = doc
thisApplication = app
' You can add additional initialization code here.
End Sub
<InfoPathEventHandler(MatchPath:="CTRL4_7", EventType:=InfoPathEventType.
OnClick)> _
Public Sub CTRL4_7_OnClick(ByVal e As DocActionEvent)
' Write your code here.
Dim myField
myField = "I am new with infopath"
XDocument.DOM.selectSingleNode("/my:myFields/my:Approver_Name").
text() = myField
End Sub
>Hi JerryB
>
[quoted text clipped - 9 lines]
>
>I hope this will help U.
Sandeep - 01 Feb 2006 17:00 GMT
Hi JerryB
sorry, i written this code in VBscript .--
Not VB.NET
InfoPath form:
Just go to "Tools" menu and select "advenced" option and change "form code
language" to VBscript
Sandeep
www.autonomysystems.com
> Thank you for the help. I am sure I am still doing something wrong.
>
[quoted text clipped - 37 lines]
> >
> >I hope this will help U.
Jerry - 01 Feb 2006 17:55 GMT
I cant change the forms type of code. It says managed Code and it is greyed
out. I tried starting a new form and put the code in that form and still get
an error. If I change to VBscript I cant pull the username. Do you know how
to do this in VB.net.
>Hi JerryB
>sorry, i written this code in VBscript .--
[quoted text clipped - 11 lines]
>> >
>> >I hope this will help U.
Sandeep - 02 Feb 2006 07:00 GMT
Hi JerryB
This is VB.net code.
Dim node As IXMLDOMNode
node =
thisXDocument.DOM.selectSingleNode("/my:myFields/my:field1")
node.text = "HI"
I hope this will help U

Signature
Sandeep
www.autonomysystems.com