<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Newbie Questions</title><link>https://www.infopathdev.com:443/forums/39.aspx</link><description>New to InfoPath? Search to see if your question has already been answered. If it has not, then ask it here or the appropriate topic forum.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Wscript Error, please help!!</title><link>https://www.infopathdev.com:443/forums/thread/19367.aspx</link><pubDate>Thu, 26 Apr 2007 04:35:22 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:19367</guid><dc:creator>K.Ramana Reddy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/19367.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=19367</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;&lt;p&gt;I think you are using VbScript,&lt;/p&gt;&lt;p&gt;For VBscript you have to use dim for variable declaration not the var and don&amp;#39;t use the ; end of the statement.&lt;/p&gt;&lt;p&gt;I tried the following code it is worked for me, try with that one.&lt;/p&gt;&lt;p&gt;Dim X &lt;/p&gt;&lt;p&gt;set X = createobject(&amp;quot;WSCRIPT.Network&amp;quot;)&amp;nbsp; &lt;/p&gt;&lt;p&gt;XDocument.DOM.selectSingleNode(&amp;quot;/my:myFields/my:field1&amp;quot;).text=X.UserName &lt;/p&gt;&lt;p&gt;I hope this will work for you.&lt;/p&gt;</description></item><item><title>Wscript Error, please help!!</title><link>https://www.infopathdev.com:443/forums/thread/19352.aspx</link><pubDate>Wed, 25 Apr 2007 14:59:42 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:19352</guid><dc:creator>aehicks</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/19352.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=19352</wfw:commentRss><description>&lt;p&gt;I am using the following code to pull the username of the person accessing my infopath form and insert their name into a field called Signature1:&lt;/p&gt;&lt;p&gt;dim x&lt;/p&gt;&lt;p&gt;var x = new ActiveXObject(&amp;quot;Wscript.Network&amp;quot;)&lt;/p&gt;&lt;p&gt;dim user &lt;/p&gt;&lt;p&gt;user = x.UserName &lt;/p&gt;&lt;p&gt;XDocument.DOM.selectSingleNode(&amp;quot;/my:myFields/my:Signature1&amp;quot;).text = user&lt;/p&gt;&lt;p&gt;When I run the form, I get the following error:&amp;nbsp; &lt;/p&gt;&lt;p&gt;InfoPath cannot open the selected form because of an error in the form&amp;#39;s code.&lt;br /&gt;The following error occurred:&lt;/p&gt;&lt;p&gt;Invalid character&lt;br /&gt;File:script.vbs&lt;br /&gt;Line:17&lt;br /&gt;var&amp;nbsp;x = new ActiveXObject(&amp;quot;Wscript.Network&amp;quot;);&lt;/p&gt;&lt;p&gt;Any ideas???&lt;/p&gt;</description></item></channel></rss>