InfoPath 2007 No Code UserName Retrieval

Just posted on using C# and the new object model in InfoPath 2007 to retrieve the current user.   I have 3 other posts that deal with this issue as well.  Believe it or not, the product team has actually addressed this in with a no code solution in InfoPath 2007.  Follow these steps to see…

3

Getting Current User in InfoPath 2007 via C#

Folks, Got a little code sample from a fellow watcher of Pashman’s Goldmine (thanks Huseyin) on how to retreive the username of the current user via C# code.  Since all code samples are useful, I’ve posted it below: public void FormEvents_Loading(object sender, LoadingEventArgs e) { string xpath = “/my:oneriForm/my:nameTxt”; string userName1; XPathNavigator field1 = MainDataSource.CreateNavigator().SelectSingleNode(xpath,…

2