Click here to Skip to main content
Rate this: bad
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
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[^]
Sergey Alexandrovich Kryukov at 17-Dec-12 17:15pm
Right, a 5.
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)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 6,554
1 OriginalGriff 6,258
2 Peter Leow 2,534
3 Maciej Los 2,308
4 Abhinav S 2,274

Advertise | Privacy | Mobile
Web03 | 2.8.150414.1 | Last Updated 17 Dec 2012
Copyright © CodeProject, 1999-2015
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