-
June 25th, 2013, 01:30 PM
#1
Delete blank page in MS word document using C#
I am using C# to create a word document from a template (Word) that contains several bookmarks. My application generates different tables and paragraphs at specific bookmarks. However, there is a blank page created in the end of the document which I am not sure how to get rid of. I searched on the internet but could not find much help. Will appreciate if anyone could provide some guidance.
-
June 25th, 2013, 06:10 PM
#2
Re: Delete blank page in MS word document using C#
Figure out what's wrong by opening the document you created in word. Probably a slight adjustment of the margins will cause the extra page to go away.
Determine what you need to do manually in Word, then change the code accordingly.
-
June 26th, 2013, 12:24 PM
#3
Re: Delete blank page in MS word document using C#
I was inserting extra paragraphs after each table I created. I just removed them and it worked fine!
Thanks for your reply.
-
June 27th, 2013, 04:17 AM
#4
Re: Delete blank page in MS word document using C#
Margins in MS Word ( all versions ) is a real pain! I had similar issues with VB.NET. Remember as well that not each PC's margins might be the same as yours on your machine. What I had to do was to add logic into my program that sets the margins precisely. Just some food for thought
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|