title: Mail Merge into word
body: <p>The Best way to create labels is using existing industry standard tools , such as Microsoft word.</p>
  
  <p>How do you execute this and set up the shipping labels ? </p>
  
  <p>I am unsure how to map merge fields against data grid view columns. This is the code I have so far:</p>
  
  <pre><code>// Create a new empty document.
  DocumentModel document = new DocumentModel();
  
  // Add document content.
  document.Sections.Add(
      new Section(document,
          new Paragraph(document,
              new Field(document, FieldType.MergeField, "FullName"))));
  
  // Save the document to a file and open it with Microsoft Word.
  document.Save("TemplateDocument.docx");
  // If document appears empty in Microsoft Word, press Alt + F9.
  Process.Start("TemplateDocument.docx");
  
  // Initialize mail merge data source.
  var dataSource = new { FullName = "John Doe" };
  
  // Execute mail merge.
  document.MailMerge.Execute(dataSource);
  
  // Save the document to a file and open it with Microsoft Word.
  document.Save("Document.docx");
  Process.Start("Document.docx");
  </code></pre>