How can I open file in notepad - InfoPath Dev Sign in | Join | Help in Newbie Questions InfoPath (Entire Site) InfoPath Dev InfoPath Dev is dedicated to bringing you the information and tools you need to be successful in your Microsoft Office InfoPath development projects. Home Blogs Forums Photos Downloads InfoPath Dev » InfoPath » Newbie Questions » How can I open file in notepad How can I open file in notepad Last post 06-14-2006 04:15 PM by rkvasal. 8 replies. Page 1 of 1 (9 items) Sort Posts: Oldest to newest Newest to oldest Previous Next 06-13-2006 11:42 AM rkvasal Joined on 05-16-2006 Posts 13 How can I open file in notepad Reply Contact Hi,Please help me on my question below:-I am a user who wants to enter a path and file name on an InfoPath form or select it from a tables drop down box. How do I open this file in a notepad document?Thanks,Raj Vasal. 06-13-2006 01:34 PM In reply to Ted Fitch Joined on 02-27-2006 Posts 567 Re: How can I open file in notepad Mark as Not AnswerMark as Answer... Reply Contact Hi rkvasal,Have you had a look at this how-to from the MS website?http://office.microsoft.com/en-ca/assistance/HP010968051033.aspx#Insert_a_dynamic_hyperlinkThis should get you started on what you want to do hopefully!Good luck 06-13-2006 01:50 PM In reply to rkvasal Joined on 05-16-2006 Posts 13 Re: How can I open file in notepad Mark as Not AnswerMark as Answer... Reply Contact Hi Ted,The link that you sent me is about to create the hyperlink, but I am looking to open with notepad.Thanks,Raj Vasal. 06-13-2006 03:35 PM In reply to Ted Fitch Joined on 02-27-2006 Posts 567 Re: How can I open file in notepad Mark as Not AnswerMark as Answer... Reply Contact Hi Raj,You can get this to work with the hyperlink method mentioned in the article, but it will only open the document in IE browser not in Notepad itself.Where is the document located that you want users to open? Is it on a network? Do you want the users to open the actual notepad file on the network and save changes or do you want them to to only be able to save a local copy of the file?Perhaps if you explain a little bit more exactly what the workflow is here I can be of better help?Thanks! 06-13-2006 03:56 PM In reply to rkvasal Joined on 05-16-2006 Posts 13 Re: How can I open file in notepad Mark as Not AnswerMark as Answer... Reply Contact Hi Ted,Actually what I am trying to do is that if we have any text field in the infoPath form and some user will enter some data in that text field then can we able to see that entered data in a notepad file and then able to edit it as well?I hope it will clear,I really appreciate your help.Please reply back if you have any solution.Thanks,Raj Vasal. 06-13-2006 06:34 PM In reply to Matt Faus Joined on 08-18-2006 Dallas, Texas Posts 1,558 Re: How can I open file in notepad Mark as Not AnswerMark as Answer... Reply Contact Referencing this thread:http://www.infopathdev.com/forums/topic.asp?TOPIC_ID=273&SearchTerms=wscript,activexYou could do something like this:var filename = XDocument.DOM.selectSingleNode( "/my:myFields/my:filename" );var Shell = new ActiveXObject("WScript.shell");var strCMD = "notepad.exe " + filename; var oExec = Shell.Exec(strCMD);var oExecOut = oExec.StdOut;var input = "";input = oExecOut.ReadAll();I hope this helps! Matt Faus / Microsoft InfoPath MVPQdabra® Software / Streamline data gathering to turn process into knowledge 06-14-2006 03:10 PM In reply to rkvasal Joined on 05-16-2006 Posts 13 Re: How can I open file in notepad Mark as Not AnswerMark as Answer... Reply Contact Hi Matt,Thank you for your reply,as I am new to InfoPath, can you please advise me where should I put the code that you have provided me in your last post,Plesae reply, really appreciate your help.Thanks,Raj Vasal. 06-14-2006 03:25 PM In reply to Matt Faus Joined on 08-18-2006 Dallas, Texas Posts 1,558 Re: How can I open file in notepad Mark as Not AnswerMark as Answer... Reply Contact You could put it anywhere, really. To try it out, place a button on the view, double-click "Edit Form Code", and then paste the code in the OnClick event handler. Matt Faus / Microsoft InfoPath MVPQdabra® Software / Streamline data gathering to turn process into knowledge 06-14-2006 04:15 PM In reply to rkvasal Joined on 05-16-2006 Posts 13 Re: How can I open file in notepad Mark as Not AnswerMark as Answer... Reply Contact Hi Matt,I tried with the button as instructed by you, so while clicking the button, notepad file is opening up.Dies it mean that when user will enter something in the text field,and after hitting the button, the entered text will show up in the notepad file?Please adviseThanks for your help.Raj Page 1 of 1 (9 items) Copyright © 2003-2019 Qdabra Software. All rights reserved.View our Terms of Use.
var filename = XDocument.DOM.selectSingleNode( "/my:myFields/my:filename" );var Shell = new ActiveXObject("WScript.shell");var strCMD = "notepad.exe " + filename; var oExec = Shell.Exec(strCMD);var oExecOut = oExec.StdOut;var input = "";input = oExecOut.ReadAll();