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

Free Support Forum - aspose.com

Paragraph Font Name

Hi

I want to set font name of a paragraph with code below

Dim par As Paragraph = New Paragraph(m_document)

Dim Run As Run = New Run(m_document, NumberVal)

par.AppendChild(Run)

par.ParagraphFormat.Style.Font.Name=fontname

objShape.FirstChild.Remove()

objShape.AppendChild(par)

But this code change the whole font of document.Please help me how could I do it?

Best Regards

Mehdi Mokhtari

Hi

Thanks for your inquiry. I think that you can try using the following code snippet

Dim par As Paragraph = New Paragraph(m_document)

Dim Run As Run = New Run(m_document, NumberVal)

Run.Font.Name=fontname

par.AppendChild(Run)

objShape.FirstChild.Remove()

objShape.AppendChild(par)

I hope this could help.

Best regards.

Hi

Thanks for the reply.I dot it and it's work but there is a problem.

When I set the font name, it reverse the string.

Thanks

Mehdi Mokhtari

Hi

Thanks for your request. Maybe you should use Font.NameBi. For more information see the following link.
http://www.aspose.com/Products/Aspose.Words/Api/Aspose.Words.Font.NameBi.html

Hope this helps.

Best regards.

Hi

Thanks it's works for me.

Best Regards

Mehdi Mokhtari