Aspose::Words::ImportFormatOptions::set_AppendDocumentWithNewPage method
ImportFormatOptions::set_AppendDocumentWithNewPage method
Sets a boolean value indicating whether to change a first imported section type to the NewPage forcibly when call AppendDocument(). The default value is true.
void Aspose::Words::ImportFormatOptions::set_AppendDocumentWithNewPage(bool value)
Remarks
Please note that this option is only relevant for the AppendDocument() method and has no effect on other import-related methods.
Examples
Shows how to preserve original section type.
auto dstDoc = System::MakeObject<Aspose::Words::Document>();
auto srcDoc = System::MakeObject<Aspose::Words::Document>();
srcDoc->get_FirstSection()->get_PageSetup()->set_SectionStart(SectionStart::Continuous);
auto options = System::MakeObject<Aspose::Words::ImportFormatOptions>();
options->set_AppendDocumentWithNewPage(false);
dstDoc->AppendDocument(srcDoc, ImportFormatMode::KeepSourceFormatting, options);
ASSERT_EQ(dstDoc->get_Sections()->idx_get(1)->get_PageSetup()->get_SectionStart(), SectionStart::Continuous);
See Also
- Class ImportFormatOptions
- Namespace Aspose::Words
- Library Aspose.Words for C++