How to restart Indent (Number bullet)

Hi,

I am using aspose word (version 3.5.1.0) (temporary licence).

1)I am importing a table from a template document which is having indent. I am replicating 10 times the same table. Now i am not able to restart that indent. Could u pls guide me on this.

2) I am having a table which is overlapping across page break. How can i solve this on word and pdf.

Thanks in advance

I.Prabhaharan.

Please be more specific on what you are trying to achieve. Some code snippets and template document sample will also help to solve you problem faster.

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

Please try the following code.

It should be applied after all sections will be appended to the output document.

Document doc = new Document(filename);

DocumentBuilder builder = new DocumentBuilder(doc);

foreach(Section section in doc.Sections)

{

foreach(Table table in section.Body.Tables)

{

// Restart numbering for the 5th row (with 'Hints' merge field)

((Cell)table.Rows[5].Cells[0]).FirstParagraph.ListFormat.ApplyNumberDefault();

foreach(Paragraph paragraph in table.GetChildNodes(NodeType.Paragraph, true))

{

// Make all paragraphs inside table to be on the same page.

paragraph.ParagraphFormat.KeepWithNext = true;

}

}

}

Here is the same code in VB.NET:

Document doc = New Document(filename)
Dim builder As DocumentBuilder = New DocumentBuilder(doc)

For Each section As Section In doc.Sections

For Each table As Table In section.Body.Tables

' Restart numbering for the 5th row (with 'Hints' merge field)
table.Rows(5).Cells(0).FirstParagraph.ListFormat.ApplyNumberDefault()

For Each paragraph As Paragraph In table.GetChildNodes(NodeType.Paragraph,True)

' Make all paragraphs inside table to be on the same page.
paragraph.ParagraphFormat.KeepWithNext = True

Next

Next

Next