We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to Retain PageLayout /Page Setup Word document

Thread ID:

Created:

Updated:

Platform:

Replies:

128633 Feb 2,2017 05:11 AM UTC Feb 3,2017 09:06 AM UTC WinRT 1
loading
Tags: DocIO
parkavi
Asked On February 2, 2017 05:11 AM UTC

Hi,


After manipulating source word document, when we try to save as new document "Page Layout" is not retained. How to solve this?

Please refer the attached samples.



Thanks
Parkavi.M

Attachment: PageLayout_6c3a98f.rar

Sethumanikkam Yogendran [Syncfusion]
Replied On February 3, 2017 09:06 AM UTC

Hi Parkavi,

Thank you for contacting Syncfusion support.

We are unable to reproduce the mentioned “Page Layout” issue with given details. We have tried to reproduce the issue at our end using below sample code.
 
// Loads template Word document.
WordDocument wordDocument = new WordDocument("Source.doc");
// Adds paragraph with text to the section.
wordDocument.LastSection.AddParagraph().AppendText("End of section added one paragraph");
// Modifies the text of first paragraph of the section.
wordDocument.LastSection.Paragraphs[0].Text = "First paragrph of section modified";
// Modifies paragrah format with back color for particular paragraph.
wordDocument.LastSection.Paragraphs[7].ParagraphFormat.BackColor = Color.Yellow;
// Saves and close the Word document instance.
wordDocument.Save("Sourcedoc-DocIO.doc");
wordDocument.Close();
 

We could see the following comparison result while opening the given Word documents in Microsoft Word application. Can you please confirm us whether you are representing this differences as an issue with "Page Layout", if so then kindly share your code snippets or sample on how you have generated this “New.doc” Word document from “Source.doc” Word document there by we could analyze further on the reported issue. 
Source and New Word document at your side 
Source and resultant Word document at our side 
 
 

If not the above differences are the reported issues, then kindly update us clear description of the issue along with screen shot to illustrate the same
which will helpful to provide you the appropriate solution at the earliest..

Please refer the UG link to know more about how to specify page properties using DocIO.

Please let us know if you have any other questions.

Regards,
Sethumanikkam.Y


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;