We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

How to delete/remove one or more Characters like this morco

does it work for Aspose word dll ?

Sub Marco1()

Selection.Delete Unit:=wdCharacter, Count:=1

End Sub


Sub Marco2()


End Sub

This message was posted using Email2Forum by alexey.noskov.


<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

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


use key “delete” after texts1 and texts2


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.


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);<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

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())





if (currentNode == endPara)



currentNode = nextNode;



If you have any further queries, please feel free to ask.