Click here to Skip to main content
12,556,922 members (52,254 online)
Rate this:
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 6: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 17-Dec-12 17:15pm
Right, a 5.
Mika 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)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.161026.1 | Last Updated 17 Dec 2012
Copyright © CodeProject, 1999-2016
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