Sending text to notepad

I want to make a delimited file and send the results to notepad.  Each record needs to be displayed on a new line.  Is there an easy way to do this?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

1) write your logs into a local file like 'C:\try.txt'
2) start the file in notepad with
   'shell notepad C:\try.txt'
3) Notepad will start with the file shown which contains your logs

Note: Writing new logs into the file while notepad shows the file will not make any 'updates' within notepad. For having dynamic overview on your logs use a listbox or something like this.

Why don't you store the items you want to send to notepad in variables, then try:

Public strStored As String

Private Sub Command1_Click()
strStored = "Put the information from your delimited file here"
Open "C:\Notepad.txt" For Append As #1
Write #1, strStored
Close #1
End Sub
jennifereAuthor Commented:
I am sending a lot of data to notepad.  This data is stored in a collection and is going to to executed in a for loop, therefore, - I'm assuming here, re-opening and closing the file may be slow.  I tryed using Shell to open Notepad.  Notepad opens okay, but I am unsure how to write my data to it.....
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

Here is a script (.vbs) you could use. No need to close the file until you're done with it.

Sub OpenTextFileTest
   Const ForReading = 1, ForWriting = 2, ForAppending = 8
   Dim fso, f
   Set fso = CreateObject("Scripting.FileSystemObject")
   Set f = fso.OpenTextFile("c:\testfile.txt", ForAppending, True)
   f.WriteLine "Hello world!"
End Sub

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jennifereAuthor Commented:
Thanks TooKoolKris.  That works!   =)
Richie_SimonettiIT OperationsCommented:
Is it necesary to use notepad? Why don't you simply append lines to a text box control.
If not, EDDY has an excelent workaround with that link.
TooKoolKris, i don't see how it would be useful, there is no code to "update" notepad there.
Well I guess it's not very important to see why it would be useful to you it's jennifere who needs to use it. When she adds this to here loop statement it will append the current .txt file with a new line for each record. Notepad is not needed. The only thing that need to be updated(appended) is the text file.

May be I mis-read the question.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.