<?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>General</title><link>https://www.infopathdev.com:443/forums/41.aspx</link><description>If you're not sure where to ask your question, ask it here. If necessary, our moderators will make sure it gets classified in the correct board.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: How to get username in a InfoPath 2003 form?</title><link>https://www.infopathdev.com:443/forums/thread/38567.aspx</link><pubDate>Wed, 18 Feb 2009 15:30:13 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:38567</guid><dc:creator>swathip</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/38567.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=38567</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Once go through the below link.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.infopathdev.com/forums/t/10170.aspx"&gt;http://www.infopathdev.com/forums/t/10170.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>How to get username in a InfoPath 2003 form?</title><link>https://www.infopathdev.com:443/forums/thread/38508.aspx</link><pubDate>Tue, 17 Feb 2009 16:08:40 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:38508</guid><dc:creator>stoepsel007</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/38508.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=38508</wfw:commentRss><description>&lt;p&gt;Hello,&lt;br /&gt;I found the following code example in order to get the username the user who opened the form:&lt;/p&gt;
&lt;p&gt;function XDocument::OnLoad(eventObj) {&lt;br /&gt;&amp;nbsp;//Create a WScript.Network object, which provides access to the user data &lt;br /&gt;var objNetwork = new ActiveXObject(&amp;quot;WScript.network&amp;quot;); &lt;/p&gt;
&lt;p&gt;//Retrieve the UserName and write it into the my:UserName field &lt;br /&gt;XDocument.DOM.selectSingleNode(&amp;quot;/my:meineFelder/my:Username&amp;quot;).text = objNetwork.UserName;&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;For testing I created a simple InfoPath form as you can see though the template.xml:&lt;/p&gt;
&lt;p&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;&amp;lt;?mso-infoPathSolution name=&amp;quot;urn:schemas-microsoft-com:office:infopath:Code:-myXSD-2009-02-17T15-22-18&amp;quot; href=&amp;quot;manifest.xsf&amp;quot; solutionVersion=&amp;quot;1.0.0.1&amp;quot; productVersion=&amp;quot;12.0.0&amp;quot; PIVersion=&amp;quot;1.0.0.0&amp;quot; ?&amp;gt;&lt;br /&gt;&amp;lt;?mso-application progid=&amp;quot;InfoPath.Document&amp;quot; versionProgid=&amp;quot;InfoPath.Document.2&amp;quot;?&amp;gt;&lt;br /&gt;&amp;lt;my:meineFelder xmlns:my=&amp;quot;&lt;a href="http://schemas.microsoft.com/office/infopath/2003/myXSD/2009-02-17T15:22:18"&gt;http://schemas.microsoft.com/office/infopath/2003/myXSD/2009-02-17T15:22:18&lt;/a&gt;&amp;quot;&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;lt;my:Username&amp;gt;&amp;lt;/my:Username&amp;gt;&lt;br /&gt;&amp;lt;/my:meineFelder&amp;gt;&lt;br /&gt;&lt;br /&gt;When I open the preview I get the following message:&lt;br /&gt;A runtime error occured.&lt;br /&gt;...&lt;br /&gt;Automation server can&amp;#39;t create object&lt;br /&gt;File: script.js&lt;/p&gt;
&lt;p&gt;What did I do wrong? How do I have to set up the form options?&lt;br /&gt;Thank you very much indeed for helping me.&lt;/p&gt;</description></item></channel></rss>