06-06-2012, 10:49
OK..
So i have some textboxes, namely 7 of them, i have managed to get it to write to a word document, but what i want is the text to be written to a word document, but with a name i choose it to be saved as, BUT, i will be saving different names, but all the same file type, so if i want to save a file named text.docx and then save a file named text2.docx
Problem is i can't get it to do that, a save file dialog doesn't work how i want it to, i click save, to save it as a .docx file type, and it closes when i save, so i figured it did, but when i look for the file, it isn't there.
I don't really want to save it from a save file dialog, i want it to save the text written in textbox1.text as the file name AND also inside of the .docx file, as well as the information from the other 6 text.boxes
here is the code for the form containing the text boxes and buttons and so forth
it works, but all it does at the moment is save it into a notepad file -___-
Also, i want to make a search function, so it searches a specific folder and reads both title and containing text for a matching value, then displays the file in the program, asking if i want to open it, or do another search?
So....
is it possible, or do i have to take another 6 months to learn C# or C++ and waste valuable time making a program which will pay for my new computer?
So i have some textboxes, namely 7 of them, i have managed to get it to write to a word document, but what i want is the text to be written to a word document, but with a name i choose it to be saved as, BUT, i will be saving different names, but all the same file type, so if i want to save a file named text.docx and then save a file named text2.docx
Problem is i can't get it to do that, a save file dialog doesn't work how i want it to, i click save, to save it as a .docx file type, and it closes when i save, so i figured it did, but when i look for the file, it isn't there.
I don't really want to save it from a save file dialog, i want it to save the text written in textbox1.text as the file name AND also inside of the .docx file, as well as the information from the other 6 text.boxes
here is the code for the form containing the text boxes and buttons and so forth
it works, but all it does at the moment is save it into a notepad file -___-
Code:
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim file As System.IO.StreamWriter
file = My.Computer.FileSystem. _
OpenTextFileWriter(mfileName, True)
file.WriteLine(TextBox1.Text)
file.WriteLine(TextBox2.Text)
file.WriteLine(TextBox3.Text)
file.WriteLine(TextBox4.Text)
file.WriteLine(TextBox5.Text)
file.WriteLine(TextBox6.Text)
file.WriteLine(TextBox7.Text)
file.Close()
End
End Sub
Also, i want to make a search function, so it searches a specific folder and reads both title and containing text for a matching value, then displays the file in the program, asking if i want to open it, or do another search?
So....
is it possible, or do i have to take another 6 months to learn C# or C++ and waste valuable time making a program which will pay for my new computer?
All i have to say is.....
lol