Creating word file using C # application

Oct 29 2009 6:52 AM
Hi... Code Project community . I need ur help in the following issue : I am developing window application in C# 2005 in which I have to print a bank statement.I am using Microsoft.Office.Interop.Word and creating Word.Application object.There is a specific format in which I have to generate the word file like (Bank logo on the top and Advertisement at the end of page)only on first page of each statement. A statement may contain multiple pages. We are creating one word file for all the accounts for a particular account type. In this case the image of the bank logo and the advt. will be coming for each new statement in that file. When I start generating the word file every thing working fine coming in required format but randomly after creating say 15 or 50 pages the alignment for the image on the top (bank logo) is distorted. Hence the all the following pages the header portion gets haywire. We to manually press 2 enter keys to bring the header down and reformat the file. This is not manually possible a single file may contain 100-150 pages. You tips and tricks on this will be appreciated. So please help me out to solve this problem its urgent. Thanks....

Answers (1)