//Get report Data list List<Art> ListData = oArts.LoadListData(); Paragraph para = document.Content.Paragraphs.Add(ref missing); para.Range.InsertParagraphBefore(); string imgPath; for (int i = 0; i < ListData.Count; i++) { string path = Server.MapPath("~/ArtImages/") + ListData[i].ArtID; imgPath = path + @"\" + ListData[i].ImageMaster.ImagePath; InlineShape map = document.InlineShapes.AddPicture(imgPath, ref missing, ref missing, ref missing); map.Height = 350; map.Width = 350; para.Range.Text = "Name : " + ListData[i].Name + Environment.NewLine; para.Range.Text = "Address : " + ListData[i].Address + Environment.NewLine; para.Range.InsertParagraphAfter(); object oPageBreak = Microsoft.Office.Interop.Word.WdBreakType.wdPageBreak; para.Range.InsertBreak(ref oPageBreak); } //Save the document object filename = "@C:\\ArtDetails.doc"; document.Close(ref missing, ref missing, ref missing); document = null; winword.Quit(ref missing, ref missing, ref missing); winword = null;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)