Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open alternate program then dump data into it.

Status
Not open for further replies.

MkIIISupra

Programmer
Apr 17, 2002
108
US
I am trying to figure out how to open TextPad (PATH=C:\Program Files\TextPad 4\TextPad.exe) then take a txtField with modified data and export that to TextPad.

So the scenario is this, I have a table that has 8 fields in it. The front form driving the table is set up to allow only a user selected number of fields to be active. 3 is the default.

So if a user needed 5 fields then they would enter 5 in a pre-defined txtBox and this would enable the first five fields for use. Each field is controlled using the KeyAscii method to prevent illegal characters.

Once all the fields are filled out a button in pressed that will loop through the records and create a Quote Comma Separated File. This format is mandatory for another application that uses this file.

So here is what the data would look like
DB fields below = 1 record
Field#1: Some Text Here
Field#2: 999999
Field#3: FileSrcName.txt
Field#4: More Text Here
Field#5: 999999
Field#6: srcFile.plf

Press Button
txtOutFile = """" & Field#1 & """" & "," & """" & Field#2 & """" & "," & """" & Field#3 & """" & "," & """" & Field#4 & """" & "," & """" & Field#5 & """" & "," & """" & Field#1 & """"

Actual output:
"Some Text Here","999999","FileScrName.txt","More Text Here","999999","srcFile.plf"

Then I want to output the txtBox to TextPad or even Notepad or just create a Text File with a .csv extension.

One by one the penguins return my sanity, as day by day Microsoft steals my sanity!

OpenSuSE 10.0 kicks fanny!
 
Here is a start, I think:
Code:
Sub shellTP()
appTP = Shell("C:\Program Files\TextPad 4\TextPad.exe")
SendKeys Forms!frmform.txtTextbox, True
SendKeys "{F12}", True
SendKeys "Doc.csv", True
SendKeys "{TAB}%S", True
End Sub
 
YOU ROCK!!!! THANK YOU!!!!!

PS: Uhhh it works great!!

One by one the penguins return my sanity, as day by day Microsoft steals my sanity!

OpenSuSE 10.0 kicks fanny!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top