Click here to Skip to main content
15,897,371 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am try to print a bill,so me want to create a word doc or excel and pass the textbox value and datagrid value into the file in a defined formatted (like bill format)
then on click print button that will be printed.
Posted

1 solution

If you want to create a Word document, one way is to use Interop. An article that could be quite close to your needs: Word document automation through .NET[^].

After filling the fields, you could just print the document (again via Interop) and that's it.

For Interop reference, see: Microsoft.Office.Interop.Word Namespace[^]
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 17-Dec-12 17:15pm    
Right, a 5.
—SA
Wendelius 22-Dec-12 3:53am    
Thanks :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900