Hi,
Here with i am sending an zip file as an attachment which includes 2 document. "Output.doc" is the having the comment to explain about my problem. And "TableTemplate_0.doc" is the template document.
And using the below coding i am generating that Output document.
Dim doc As New Document
Dim builder As New DocumentBuilder(doc)
Dim templateDoc As New Document("C:\Inetpub\wwwroot\Print Tool\TableTemplate_0.doc")
Dim tempSection As Aspose.Words.Section = doc.ImportNode(templateDoc.Sections(0), True)
Dim intIndex As Int16
For intIndex = 0 To 9
doc.Sections.Add(tempSection.Clone(True))
builder.MoveToDocumentEnd()
builder.Writeln("")
Next intIndex
Dim dstStream As MemoryStream = New MemoryStream
doc.Save(dstStream, SaveFormat.FormatDocument)
Response.Clear()
Response.ContentType = "application/msword"
Response.BinaryWrite(dstStream.ToArray())
dstStream.Close()
Response.End()
Regards,
I.Prabhaharan