Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Converting excel to notepad | Excel Discussion (Misc queries) | |||
Notepad to excel | Excel Discussion (Misc queries) | |||
notepad to excel | New Users to Excel | |||
notepad to excel spreadsheet | Excel Programming | |||
notepad in excel | Excel Programming |