Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: WPF
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 17-Dec-12 7:40am

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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[^]
  Permalink  
Comments
Sergey Alexandrovich Kryukov at 17-Dec-12 17:15pm
   
Right, a 5.
—SA
Mika Wendelius at 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)



Advertise | Privacy | Mobile
Web02 | 2.8.1411022.1 | Last Updated 17 Dec 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100