Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / April 2006

Tip: Looking for answers? Try searching our database.

getcurrentuser

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
lian - 14 Apr 2006 10:31 GMT
In infopath,I can show the current user name and Domain  name in textbox  
through review ,but   it  can not see the result in .xml.

code:
function XDocument::OnLoad(eventObj)
{
  var objNetwork = new ActiveXObject("WScript.network");

    //Retrieve the UserName and write it into the my:UserName field
    XDocument.DOM.selectSingleNode("//my:UserName").text
    =objNetwork.UserName;

    //Retrieve the UserDomain and write it into the my:UserDomain field
    XDocument.DOM.selectSingleNode
    ("/my:myFields/my:UserDomain").text
    = objNetwork.UserDomain;
}

requst help!!!
Sandeep - 17 Apr 2006 11:50 GMT
Hi..Lina
Check out this link.

http://www.infopathdev.com/forums/topic.asp?TOPIC_ID=173

I Hope this will help you
Signature

Sandeep
www.autonomysystems.com

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.