Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using Word = Microsoft.Office.Interop.Word;
- Word.Application wordApp = new Word.Application();
- Word.Document doc = null;
- // open the template file
- doc = wordApp.Documents.Open(templateFileName, Type.Missing, bReadOnly);
- doc.MailMerge.OpenDataSource(dataSourceFileName);
- // Perform mail merge.
- doc.MailMerge.Destination = Word.WdMailMergeDestination.wdSendToNewDocument;
- doc.MailMerge.Execute();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement