Skip to content

Instantly share code, notes, and snippets.

@GroupDocsGists
Last active February 23, 2022 10:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GroupDocsGists/82e3cb6fd5443747d7e700199a5a3cb4 to your computer and use it in GitHub Desktop.
Save GroupDocsGists/82e3cb6fd5443747d7e700199a5a3cb4 to your computer and use it in GitHub Desktop.
How to Move Word Pages using C#
// Rearrange pages of Word Processing documents (DOC/DOCX) using C#
int pageNumber = 7;
int newPageNumber = 2;
MoveOptions moveOptions = new MoveOptions(pageNumber, newPageNumber);
using (Merger merger = new Merger("path\document.docx"))
{
merger.MovePage(moveOptions);
merger.Save("path\rearranged-document.docx");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment