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

Free Support Forum - aspose.com

How to replace an image or string with some other ascii value of symbol?

Hi Team,
I have an aspose generated word document ,that contain bullets and images( arrow and hyphen images as bullets)
I want to replace some strings and some images with ascii value of other symbol
Kindly help hows this possible??

I am trying to use :
asposeDoc.getRange().replace("", “”, false, true);

But its not helping out.Kindly assist here .Appreciate for very soon reply.

Sonam Arora

To add here.How to replace a particular bullet or image with other ascii value symbol. As I can replace string with string using below.method :;:

asposeDoc.getRange().replace(“oldvalue”, “newvalue”, true, true);

How to replace a bullet pattern with some symbol with its ascii value?

Sonam Arora

Hi Sonam,

Thanks for your inquiry. The Range.replace method replaces all occurrences of a specified string with another string. Range.replace does not replace the bullet. To replace the bullet images, please use the following code example. Hope this helps you.

Document doc = new Document(MyDir + “in.docx”);

// Create a list based on one of the Microsoft Word list templates.

List list = doc.getLists().add(ListTemplate.NUMBER_DEFAULT);

// Completely customize one list level.

ListLevel level1 = list.getListLevels().get(0);




for(Paragraph para : (Iterable)doc.getChildNodes(NodeType.PARAGRAPH, true))







doc.save(MyDir + "Out.docx");

<!–[if gte mso 9]>
<m:mathFont m:val=“Cambria Math”/>
<m:brkBin m:val=“before”/>
<m:brkBinSub m:val="–"/>
<m:smallFrac m:val=“off”/>
<m:lMargin m:val=“0”/>
<m:rMargin m:val=“0”/>
<m:defJc m:val=“centerGroup”/>
<m:wrapIndent m:val=“1440”/>
<m:intLim m:val=“subSup”/>
<m:naryLim m:val=“undOvr”/>
<![endif]–><!–[if gte mso 10]>

/* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin-top:0in; mso-para-margin-right:0in; mso-para-margin-bottom:10.0pt; mso-para-margin-left:0in; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin;}

<![endif]–>If you still face problem, please share your input and expected output document here for our reference. We will then provide you more information about your query along with code.