TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Anthony Clarke
NA
127
0
Word mail merge using datatable
Jan 14 2011 5:07 AM
Hi,
Im new to using word with C# and was wondering whether you could help me.
I need to make a mail merge from a datatable....e.g.
Datatable is source from an SQL server e.g. Name, Address, PostCode.
And here is my code for word so far. How do i go about inserting and printing everything - well say i have 5 records..
Thanks for your time
namespace
ConsoleApplication3
{
class
Program
{
static
void
Main(
string
[] args)
{
dynamic
wordApp =
Activator
.CreateInstance(
Type
.GetTypeFromProgID(
"Word.Application"
));
dynamic
document = wordApp.Documents.Add();
document.Activate();
document.Content.InsertAfter(
"Type what i want"
);
wordApp.Visible =
true
;
Reply
Answers (
0
)
Classe declaration
Combobox update problem