• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1000
  • Last Modified:

C# Remove a Page Break in MS Word

I am working with MS Word Interop.  I converted a document from Crystal to MS Word in RTF Format and a page break is in the document.  I need to delete the page break.

Any ideas?
0
CipherIS
Asked:
CipherIS
  • 3
1 Solution
 
mlmccCommented:
I can think of 3 ways to maybe do that.

1.  Set the paper size so it is tall enough to handle the report on a single page.  Try legal and ledger.  You may have to create a custom paper size.

2. Install a new printer driver that handles larger pages.  You can even use a plotter which can handle some very large pages.  May have to set width margin (right and left) in the report to limit the width.

3.  Set the No Printer option in the page setup.  Also set the option to DISSOCIATE PAGE SIZE FROM PRINTER

mlmcc
0
 
CipherISAuthor Commented:
I need to delete programmatically unfortunately.
0
 
CipherISAuthor Commented:
I wrote code in C# to look for "^m" to delete the page break.
0
 
CipherISAuthor Commented:
Wrote the code and posted the solution.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now