How can I open file in notepad - InfoPath Dev
in

InfoPath Dev

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: Previous Next
  • 06-13-2006 11:42 AM

    How can I open file in notepad

    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

    Re: How can I open file in notepad

    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_hyperlink

    This should get you started on what you want to do hopefully!

    Good luck
  • 06-13-2006 01:50 PM In reply to

    Re: How can I open file in notepad

    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

    Re: How can I open file in notepad

    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

    Re: How can I open file in notepad

    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

    Re: How can I open file in notepad

    Referencing this thread:http://www.infopathdev.com/forums/topic.asp?TOPIC_ID=273&SearchTerms=wscript,activex

    You 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 MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 06-14-2006 03:10 PM In reply to

    Re: How can I open file in notepad

    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

    Re: How can I open file in notepad

    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 MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 06-14-2006 04:15 PM In reply to

    Re: How can I open file in notepad

    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 advise

    Thanks for your help.
    Raj
Page 1 of 1 (9 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.