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

Free Support Forum - aspose.com

A couple of questions regarding Aspose.Words

I was looking at your product Aspose.Words online on your website and I was wondering if your product was able to handle the following scenario:

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

We have a folder with 2,843 word documents in it and we would like to write a program that does the following dynamically using your product Aspose.Words.

1.) Open each word document and automatically update:

a. The font style to “New Courier”

b. The font size to “12pt”

c. The entire document to be double spaced

2.) Insert a header automatically that is:

a. Right aligned

b. Shows the page number on alternating pages (the even pages not the odd).

c. Insert a hexadecimal code in the header that is taken from the very first line of the document

d. Enter two line breaks in the header below the Page # and Hexadecimal code

We want to write a program in Visual Studio .NET that would do all this, can your product do it? It would take one of our employees days to do this manually so we are trying to automate it.


This message was posted using Email2Forum by sheliah.


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

Thanks for your interest in Aspose.Words. I think you can easily achieve this with Aspose.Words. To change font name and size you can try using FontChanger class as described here:


All that you need is modifying FontChanger in order to change font size and font name.

Regarding double spacing you can try using the following code:

Document doc = new Document("Test.doc");

// Get all paragraphs in the document.

NodeCollection paragraphs = doc.GetChildNodes(NodeType.Paragraph, true);

// Loop through all paragraphs.

foreach (Paragraph paragr in paragraphs)


// Set LineSpacing.

paragr.ParagraphFormat.LineSpacingRule = LineSpacingRule.Multiple;

paragr.ParagraphFormat.LineSpacing = 24;



Regarding Header, please follow the link to learn how to work with Header/Footer using Aspose.Words:


Please let me know in case of any issues. I will be glad to help you.

Best regards,