Word automation using C#
-
Hello, I want to create word document using c#,now i did the task to create simple word document using word DLL. now my requirement is to make more automation on created word document through c# code,required automation as describe below... -> Define header and footer,footer contains page number,while header contains some text but i need that header change on odd and even pages,which is property of word "Different Odd & Event Pages". -> define the fix page size,and need to define margin from 4 different side. so please help me to short out my requirements. Thanks, Kaushal.
-
Hello, I want to create word document using c#,now i did the task to create simple word document using word DLL. now my requirement is to make more automation on created word document through c# code,required automation as describe below... -> Define header and footer,footer contains page number,while header contains some text but i need that header change on odd and even pages,which is property of word "Different Odd & Event Pages". -> define the fix page size,and need to define margin from 4 different side. so please help me to short out my requirements. Thanks, Kaushal.
-
hello musefan, I have already search out on msdn as well as many more sites,but still i can get only which already i have implement,but i am not getting that much things which is describe in previous post and i am also continue with searching more.
nikunj padaliya
-
hello musefan, I have already search out on msdn as well as many more sites,but still i can get only which already i have implement,but i am not getting that much things which is describe in previous post and i am also continue with searching more.
nikunj padaliya
-
Hello, I want to create word document using c#,now i did the task to create simple word document using word DLL. now my requirement is to make more automation on created word document through c# code,required automation as describe below... -> Define header and footer,footer contains page number,while header contains some text but i need that header change on odd and even pages,which is property of word "Different Odd & Event Pages". -> define the fix page size,and need to define margin from 4 different side. so please help me to short out my requirements. Thanks, Kaushal.
Are you tied to creating this document through automation? If not, and you are targetting Office 2003 or Office 2007, why not generate the document using WordML? What you would normally do, is generate a dummy document that matched the formatting you want, and then use this as a basis for applying the styling that you want via XML. The advantage of this approach, is you don't need to have Word installed on a target machine to make use of this technique, which is great if you run this on a server.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith
As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
-
Are you tied to creating this document through automation? If not, and you are targetting Office 2003 or Office 2007, why not generate the document using WordML? What you would normally do, is generate a dummy document that matched the formatting you want, and then use this as a basis for applying the styling that you want via XML. The advantage of this approach, is you don't need to have Word installed on a target machine to make use of this technique, which is great if you run this on a server.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith
As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
-
hmmm... Headers and Footers[^]
Life goes very fast. Tomorrow, today is already yesterday.
Hi musefan, Thanks for your link,i can go through that and use that code for creating header on my application but when document is generated than i couldn't get the header text,it gives error like "Error! Auto Text entry not defined." Thanks & Regards Kaushal.
nikunj padaliya
-
Hi, Thanks for your reply,i can understand your suggestion,for that can you provide me any example or any reference link,through which i can do it.
nikunj padaliya
Hi Kaushal, Did you get the solution for your problem? Basically, i am also having the same issue. I want to fix the word document page size and want to repeat the header and footer for every page. Actually i am exporting a gridview to the Word Document. Its all working fine without using the Word dll.But now to get the fixed page size of the word doc and pagination in the word ..like footer should display the page number am i really need the word.dll? and if you find the solution for your problem please let me know by a reply to this post. Thanks in advance.
-
Hello, I want to create word document using c#,now i did the task to create simple word document using word DLL. now my requirement is to make more automation on created word document through c# code,required automation as describe below... -> Define header and footer,footer contains page number,while header contains some text but i need that header change on odd and even pages,which is property of word "Different Odd & Event Pages". -> define the fix page size,and need to define margin from 4 different side. so please help me to short out my requirements. Thanks, Kaushal.
Maybe you can try to use a c# word automation component to create word document and header,footer.Just like the Spire.Doc