Hi mitenikolov,
You can use Microsoft.Office.Interop.Word to put data in datagridview into word.
First, you need to add Microsoft.Office.Interop.Word reference by following steps:
Right click the project-> Manage NugetPackages->Browse-> Enter the "Microsoft.Office.Interop.Word" into the search box -> Install it.
Here is a code example you can refer to.17103-test-2.txt
Best Regards,
Daniel Zhang
How to properly create a Word or PDF document with values from DataBase
mite nikolov
1
Reputation point
Hello,
I would like to ask for an advice. I have this model below that I need to create and fill it with some values from my DataBase.
What is the best way to accomplish this type of job? I've already tried to design the table directly on the form and print the form later, but sometimes the DataGridView is too long so my Form goes out of limits and it print only the parts that is seen on the Monitor.
An advice would be really appreciated..
Regards
1 answer
Sort by: Most helpful
-
Daniel Zhang-MSFT 9,626 Reputation points
2020-08-12T02:34:15.32+00:00