Results 1 to 7 of 7

Thread: Opening a *.txt in Notepad

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2005
    Posts
    2

    Red face Opening a *.txt in Notepad

    This should be so simple, I know. I have already created and closed the file, let's say "xyz.txt", and now I need to open it in notepad so the user can see, edit, and/or Save As. How do I do this in VB6?

  2. #2
    Frenzied Member
    Join Date
    Oct 2003
    Posts
    1,301

    Re: Opening a *.txt in Notepad

    Try calling notepad with Shell and add the file's name and path as a parameter

  3. #3
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Opening a *.txt in Notepad

    Welcome to the forums.
    VB Code:
    1. Private Sub Command1_Click()
    2. Shell "notepad c:\xyz.txt", vbNormalFocus
    3. End Sub

  4. #4

    Thread Starter
    New Member
    Join Date
    Jul 2005
    Posts
    2

    Thumbs up Re: Opening a *.txt in Notepad

    Thanks, that helps a lot.

  5. #5
    Supreme User Madboy's Avatar
    Join Date
    Oct 2003
    Location
    England
    Posts
    3,253

    Re: Opening a *.txt in Notepad

    Remember you can use Google as your friend, or the built in Search engine on this forum

  6. #6
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Opening a *.txt in Notepad

    Madboy: Did you happen to see the Delphi question in the API section?

  7. #7
    Supreme User Madboy's Avatar
    Join Date
    Oct 2003
    Location
    England
    Posts
    3,253

    Re: Opening a *.txt in Notepad

    no, i will look now...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width