What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Plug-Ins » create a .txt file through VB

create a .txt file through VB
Author: Message:
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: create a .txt file through VB
code:
'This will write to the text file
Open <Path Of File> for Append As #1
Print #1, Text1.Text
Close #1

'This will read the text file
Dim strTextFile As String
Open <Path Of File> for Input as #1
   Do Until EOF(1)
     Input#1,strTextFile
     Text1.Text=Text1.Text & strTextFile & vbnewline
   Loop
Close #1

'This will clear the text file
Open <Path Of File> For Output As #1
Close #1

'OR

Kill <Path Of File>



It is easiest to use the vb Function App.Path & "\Whatever.txt"

That means that the text file you are looking for is in the same place as the exe, its a lot easier then specifing an exact path because what happens if they install the application to another place :)

This post was edited on 05-19-2004 at 01:46 PM by matty.
05-19-2004 01:46 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
create a .txt file through VB - by _BassReFLeX_ on 05-18-2004 at 02:36 PM
RE: create a .txt file through VB - by Stigmata on 05-18-2004 at 02:42 PM
RE: create a .txt file through VB - by _BassReFLeX_ on 05-18-2004 at 02:45 PM
RE: create a .txt file through VB - by Stigmata on 05-18-2004 at 03:03 PM
RE: create a .txt file through VB - by Mike on 05-18-2004 at 03:08 PM
RE: create a .txt file through VB - by Stigmata on 05-18-2004 at 03:11 PM
RE: create a .txt file through VB - by _BassReFLeX_ on 05-19-2004 at 11:10 AM
RE: RE: create a .txt file through VB - by Dempsey on 05-19-2004 at 01:40 PM
RE: create a .txt file through VB - by Mike on 05-19-2004 at 11:18 AM
RE: create a .txt file through VB - by matty on 05-19-2004 at 01:46 PM
RE: RE: create a .txt file through VB - by Dempsey on 05-19-2004 at 05:14 PM
RE: create a .txt file through VB - by CookieRevised on 05-19-2004 at 06:07 PM
RE: create a .txt file through VB - by _BassReFLeX_ on 05-21-2004 at 10:08 AM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On