object oMissing = System.Reflection.Missing.Value;
object oEndOfDoc = "\\endofdoc"; /* \endofdoc is a predefined bookmark */
//Start Word and create a new document.
Word._Application oWord;
Word._Document oDoc;
oWord = new Word.Application();
oWord.Visible = true;
oDoc = oWord.Documents.Add(ref oMissing, ref oMissing,
ref oMissing, ref oMissing);
object oRng = oDoc.Bookmarks.get_Item(ref oEndOfDoc).Range;
SPList oList = oWeb.Lists["Self Evaluation Form"];
Word.Paragraph oPara3;
foreach(SPListItem item in oList.Items)
{
oRng = oDoc.Bookmarks.get_Item(ref oEndOfDoc).Range;
oPara3 = oDoc.Content.Paragraphs.Add(ref oRng);
[U][B]string hello = Server.HtmlDecode(item["Section Body"].ToString());[/B][/U]
oPara3.Range.Text = hello;
oPara3.Format.SpaceAfter = 15;
oPara3.Range.InsertParagraphAfter();
}