key in data into another application using vb6

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • v2ganesh
    New Member
    • Mar 2007
    • 2

    key in data into another application using vb6

    Hi all,
    I need help!! I am fairly new at VB and I have already tried searching for the answer... Using previous post and examples i managed to open edit.com file with a click of Commandbutton1 using this code,

    e.g:
    Private Sub Command1_Click( )
    Shell ("edit.com e:\test")
    End Sub

    Problem is: Now i have command button2 and textbox1. I want the data or value in the textbox1 to be entered at the above edit.com application at a specific line when i click command button2.

    e.g: the data in textbox1 is "help" n i want the word "help" to be at line 5 at edit.com application after i click the command button2.

    There are few examples in previous posts and most of it are for word application(RTF ). Somebody please help me. atleast give me some examples.

    to open edit application go to, (start -> run -> edit).

    thanks in advance,
  • willakawill
    Top Contributor
    • Oct 2006
    • 1646

    #2
    Hi. Doesn't sound too difficult if I understand you correctly. I would open the text file in vb. Insert the word you want at the location you want and save the text file. Then you can open the text file with edit.com.

    Comment

    • Killer42
      Recognized Expert Expert
      • Oct 2006
      • 8429

      #3
      Originally posted by willakawill
      Hi. Doesn't sound too difficult if I understand you correctly. I would open the text file in vb. Insert the word you want at the location you want and save the text file. Then you can open the text file with edit.com.
      If we're talking about a file which is already open in Edit, and you want to modify it from VB, that may be more of a problem.

      Comment

      • vijaydiwakar
        Contributor
        • Feb 2007
        • 579

        #4
        Originally posted by v2ganesh
        Hi all,
        I need help!! I am fairly new at VB and I have already tried searching for the answer... Using previous post and examples i managed to open edit.com file with a click of Commandbutton1 using this code,

        e.g:
        Private Sub Command1_Click( )
        Shell ("edit.com e:\test")
        End Sub

        Problem is: Now i have command button2 and textbox1. I want the data or value in the textbox1 to be entered at the above edit.com application at a specific line when i click command button2.

        e.g: the data in textbox1 is "help" n i want the word "help" to be at line 5 at edit.com application after i click the command button2.

        There are few examples in previous posts and most of it are for word application(RTF ). Somebody please help me. atleast give me some examples.

        to open edit application go to, (start -> run -> edit).

        thanks in advance,
        see this task can be done with the help of filesystem object or u may use dos reports
        try it

        Comment

        • Killer42
          Recognized Expert Expert
          • Oct 2006
          • 8429

          #5
          Originally posted by vijaydiwakar
          see this task can be done with the help of filesystem object or u may use dos reports
          What is a dos report?

          Comment

          • v2ganesh
            New Member
            • Mar 2007
            • 2

            #6
            willakawill, your idea seems to be ok. i can give it a shot. but can u give me an example for a notepad. By the way what is DOS report. I prefer to do this directly into edit.com rather than using notepad. hereby i have attached some pics of what i need to do..


            Opened an edit.com file.. you can notice some empty lines..


            This is an example of my VB interface. Once i click the command button, all the filled data in the textbox should be transfered and shown in the edit.com file.


            All the data has been transfered at its specific location.

            Hope this will give u a clear picture of what am i suppose to do and hope u guys can help me..

            Do let me know if there are anymore information needed. thank you.

            Comment

            Working...