1st of all this isn't a word file, but a text file with .doc extension. If you open one in notepad you'll see it's contents.
to save it with tbox_Inv_Date.Text as filename you should:
Dim New_Doc As String = "C:\Users\ComputerFirstAde\Desktop\" & tbox_Inv_Date.Text & ".doc"
adam_k
Veteran Poster
1,057 posts since Jun 2011
Reputation Points: 274
Solved Threads: 205
Skill Endorsements: 11
Why do you have to write to a word file? If it's a requirement then you've got to use word to write to it's files.
I can't remember having come across an article with word, but this is doing pretty much the same thing with Excel: http://www.daniweb.com/software-development/vbnet/threads/419083/finding-the-next-row-in-excel-spreadsheet
If all you want to do is do some calculations and save a file - even print it - may I suggest building the entire thing in Word VBA? It will save you both time and it will be easier to debug and possibly maintain. After all once you declare the object you'll have to pass VBA commands to it.
adam_k
Veteran Poster
1,057 posts since Jun 2011
Reputation Points: 274
Solved Threads: 205
Skill Endorsements: 11
Or you could use the RichTextBox control and write to an rtf file which is readable by Word.
Reverend Jim
Carpe per diem
3,592 posts since Aug 2010
Reputation Points: 561
Solved Threads: 445
Skill Endorsements: 32
Or just because it's word doesn't mean you can't use plain text
tinstaafl
Nearly a Posting Virtuoso
1,311 posts since Jun 2010
Reputation Points: 341
Solved Threads: 226
Skill Endorsements: 14
You can use both text and rtf, but would you call it a word file and give it extension .doc (or .docx) ? If this is a school project, will it get the grade?
I've got to ask the OP though, why Word files?
adam_k
Veteran Poster
1,057 posts since Jun 2011
Reputation Points: 274
Solved Threads: 205
Skill Endorsements: 11
Since you already know it's bad design, listen to logic and switch to an alternative.
It would save you a lot of trouble down the line to do it right from the begining.
adam_k
Veteran Poster
1,057 posts since Jun 2011
Reputation Points: 274
Solved Threads: 205
Skill Endorsements: 11
The newer office file formats such as "docx" and "xlsx" are in reality zip packages containing the files that define the contents in "XML" format. These can be created using: Open XML SDK 2.0 for Microsoft Office.
You can view the "XML" content of an office file by renaming it with a ".zip" extension and then opening the compressed folder in explorer or use a utility like "7Zip" to open the office file as an archive directly.
Here is a link to a three part article on creating a Word "Docx" file.
Creating Documents by Using the Open XML Format SDK 2.0
TnTinMN
Practically a Master Poster
640 posts since Jun 2012
Reputation Points: 418
Solved Threads: 148
Skill Endorsements: 13