Latest shipments:
Item 8,9,10 complete – 23-Mar-2010
Next forecast shipments:
Items 1 & 2 complete – 12-Apr-2010
Items 5 Thermal couple - 15-Apr-2010
I’m trying to extract the text – and formatting – shown above.
Using the code below, I’m able to get the carriage control / linefeeds at the end of each line, but the indentations (tabs) are lost. In other words, I’m getting: “Latest shipments:\r\nItem 8,9,10 complete – 23-Mar-2010\r\nNext forecast shipments:\r\nItems 1 & 2 complete – 12-Apr-2010\r\nItems 5 Thermal couple - 15-Apr-2010\r\n\r\n”.
But I want something like: “Latest shipments:\r\n**\tItem 8,9,10 complete – 23-Mar-2010\r\nNext forecast shipments:\r\n\t** Items 1 & 2 complete – 12-Apr-2010\r\n**\t** tems 5 Thermal couple - 15-Apr-2010\r\n\r\n”.
// Move DocumentBuilder cursor to the bookmark
DocumentBuilder builder = new DocumentBuilder(doc);
bool foundBookmark = builder.MoveToBookmark(bookmark, true, false);
if (foundBookmark)
{
Paragraph para = builder.CurrentParagraph;
Cell cell = para.GetAncestor(NodeType.Cell) as Cell;
if (cell != null)
{
text = cell.ToTxt();
}
}
Thanks.
This message was posted using Page2Forum from Aspose.Words for .NET and Java