does it work for Aspose word dll ?
Sub Marco1()
Selection.Delete Unit:=wdCharacter, Count:=1
End Sub
or
Sub Marco2()
Selection.TypeBackspace
End Sub
This message was posted using Email2Forum by alexey.noskov.
does it work for Aspose word dll ?
Sub Marco1()
Selection.Delete Unit:=wdCharacter, Count:=1
End Sub
or
Sub Marco2()
Selection.TypeBackspace
End Sub
This message was posted using Email2Forum by alexey.noskov.
Hi
Thanks for your inquiry. There is no analog of such method in Aspose.Words.
Could you please explain how you would like to use such method? Maybe there is simpler way to achieve the same.
Best regards,
like this
texts1
texts2
texts3
use key “delete” after texts1 and texts2
texts1texts2texts3
but these words may contain image object or mathtype object .
Hi there,
Could you please attach a sample template for us to look at and we will provide some further suggestions.
Thanks,
thank you for reply.
I have attached two word file as
File attachment: before.doc
File attachment: after.doc
Hi there,
Thanks for this additional information.
In this case each line is a different paragraph so you want to combine all of these paragraphs into one. Please see the code implementation below which does this.
Paragraph startPara = (Paragraph) doc.GetChild(NodeType.Paragraph, 2, true);
Paragraph endPara = (Paragraph) doc.GetChild(NodeType.Paragraph, 8, true);
CombineParagraphsIntoOne(startPara, endPara);
///
/// Combines all paragraphs between the start and end nodes into one paragraph.
///
/// The paragraph in which all subsequent paragraphs will be appended to.
/// The paragraph in which the joining will stop.
public static void CombineParagraphsIntoOne(Paragraph startPara, Paragraph endPara)
{
Node currentNode = startPara.NextSibling;
while (currentNode != null)
{
Node nextNode = currentNode.NextSibling;
if (currentNode.NodeType == NodeType.Paragraph)
{
Paragraph currentPara = (Paragraph) currentNode;
foreach(Node node in currentPara.ChildNodes.ToArray())
{
startPara.AppendChild(node);
}
currentNode.Remove();
if (currentNode == endPara)
break;
}
currentNode = nextNode;
}
}
If you have any further queries, please feel free to ask.
Thanks,