Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 88
Default Control Notepad from Excel

Does anyony know if it is possible to open a note pad
file from excel, enter in some information (All Text)
save the file as a specific name in a specific directory
on the users PC.

Basically what I want to do is this
Open notepad
write some text
save file as "something" in "somewhere"
close notepad
close excel
End

Any help would be appreciated.
Thanks
Pete
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 226
Default Control Notepad from Excel

You don't need Notepad to do that. You can do that by using VBA's builtin
commands, like Open, Print # (or Write #), Close, etc.

--
Regards

Juan Pablo González

"Pete" wrote in message
...
Does anyony know if it is possible to open a note pad
file from excel, enter in some information (All Text)
save the file as a specific name in a specific directory
on the users PC.

Basically what I want to do is this
Open notepad
write some text
save file as "something" in "somewhere"
close notepad
close excel
End

Any help would be appreciated.
Thanks
Pete



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 88
Default Control Notepad from Excel

Juan

It really does need to be in a notepad format. I have a
Notepad file .csv that is required to control another
program, or the other program (Visual Basic) is writen to
look for this file in order to perform the funtions
needed.

I have up update this notepad file everyweek and send
this off to 200 sales rep around the country. If they
don't install this notepad file in their PC their sales
reporting tools will not work.

Thanks
Pete
-----Original Message-----
You don't need Notepad to do that. You can do that by

using VBA's builtin
commands, like Open, Print # (or Write #), Close, etc.

--
Regards

Juan Pablo González

"Pete" wrote in

message
...
Does anyony know if it is possible to open a note pad
file from excel, enter in some information (All Text)
save the file as a specific name in a specific

directory
on the users PC.

Basically what I want to do is this
Open notepad
write some text
save file as "something" in "somewhere"
close notepad
close excel
End

Any help would be appreciated.
Thanks
Pete



.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 214
Default Control Notepad from Excel

Hi Pete,
Shell "C:\WINDOWS\NOTEPAD.EXE", 1

MP

"Pete" a écrit dans le message de
...
Does anyony know if it is possible to open a note pad
file from excel, enter in some information (All Text)
save the file as a specific name in a specific directory
on the users PC.

Basically what I want to do is this
Open notepad
write some text
save file as "something" in "somewhere"
close notepad
close excel
End

Any help would be appreciated.
Thanks
Pete



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Control Notepad from Excel

The open/print#/close stuff writes to a plain old text file.

That's what NotePad uses.

Option Explicit
Sub testme()

Dim myFileName As String
Dim FileNum As Long

myFileName = "C:\my documents\excel\outfile.txt"

FileNum = FreeFile
Close FileNum
Open myFileName For Output As FileNum

Print #FileNum, "Here's some text"
Print #FileNum, "from A1: " & ActiveSheet.Range("a1").Text

Close FileNum
End Sub

Try this little example to see if it works (open the output file in NotePad).

Here are three sites that you could steal some code from:

Earl Kiosterud's Text Write program:
www.smokeylake.com/excel
(or directly: http://www.smokeylake.com/excel/text_write_program.htm)

Chip Pearson's:
http://www.cpearson.com/excel/imptext.htm

J.E. McGimpsey's:
http://www.mcgimpsey.com/excel/textfiles.html

Pete wrote:

Juan

It really does need to be in a notepad format. I have a
Notepad file .csv that is required to control another
program, or the other program (Visual Basic) is writen to
look for this file in order to perform the funtions
needed.

I have up update this notepad file everyweek and send
this off to 200 sales rep around the country. If they
don't install this notepad file in their PC their sales
reporting tools will not work.

Thanks
Pete
-----Original Message-----
You don't need Notepad to do that. You can do that by

using VBA's builtin
commands, like Open, Print # (or Write #), Close, etc.

--
Regards

Juan Pablo González

"Pete" wrote in

message
...
Does anyony know if it is possible to open a note pad
file from excel, enter in some information (All Text)
save the file as a specific name in a specific

directory
on the users PC.

Basically what I want to do is this
Open notepad
write some text
save file as "something" in "somewhere"
close notepad
close excel
End

Any help would be appreciated.
Thanks
Pete



.


--

Dave Peterson

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting excel to notepad Cindy Excel Discussion (Misc queries) 3 July 6th 07 03:15 PM
Notepad to excel T Miller Excel Discussion (Misc queries) 5 October 19th 06 10:56 PM
notepad to excel jeremy via OfficeKB.com New Users to Excel 1 June 9th 05 05:46 PM
notepad to excel spreadsheet CPower[_16_] Excel Programming 2 June 24th 04 03:51 PM
notepad in excel Mohan[_2_] Excel Programming 1 August 29th 03 03:08 PM


All times are GMT +1. The time now is 01:00 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"