Aspose::Words::Settings Namespace Reference

Detailed Description

The Aspose.Words.Settings namespace contains classes and enums that are used when specifying various settings and options stored in a document. These are mail merge, write protection, compatibility and other settings.

Classes

class  CompatibilityOptions
 Contains compatibility options (that is, the user preferences entered on the Compatibility tab of the Options dialog in Microsoft Word). More...
 
class  HyphenationOptions
 Allows to configure document hyphenation options. More...
 
class  MailMergeSettings
 Specifies all of the mail merge information for a document. More...
 
class  Odso
 Specifies the Office Data Source Object (ODSO) settings for a mail merge data source. More...
 
class  OdsoFieldMapData
 Specifies how a column in the external data source shall be mapped to the predefined merge fields within the document. More...
 
class  OdsoFieldMapDataCollection
 A typed collection of the OdsoFieldMapData objects. More...
 
class  OdsoRecipientData
 Represents information about a single record within an external data source that is to be excluded from the mail merge. More...
 
class  OdsoRecipientDataCollection
 A typed collection of OdsoRecipientData More...
 
class  ViewOptions
 Provides various options that control how a document is shown in Microsoft Word. More...
 
class  WriteProtection
 Specifies write protection settings for a document. More...
 

Enumerations

enum class  Compatibility
 Specifies names of compatibility options. More...
 
enum class  MailMergeCheckErrors
 Specifies how Microsoft Word will report errors detected during mail merge. More...
 
enum class  MailMergeDataType
 Specifies the type of an external mail merge data source. More...
 
enum class  MailMergeDestination
 Specifies the possible results which may be generated when a mail merge is carried out on a document. More...
 
enum class  MailMergeMainDocumentType
 Specifies the possible types for a mail merge source document. More...
 
enum class  MsWordVersion
 Allows Aspose.Wods to mimic MS Word version-specific application behavior. More...
 
enum class  MultiplePagesType
 Specifies how document is printed out. More...
 
enum class  OdsoDataSourceType
 Specifies the type of the external data source to be connected to as part of the ODSO connection information. More...
 
enum class  OdsoFieldMappingType
 Specifies the possible types used to indicate if a given mail merge field has been mapped to a column in the given external data source. More...
 
enum class  ViewType
 Possible values for the view mode in Microsoft Word. More...
 
enum class  ZoomType
 Possible values for how large or small the document appears on the screen in Microsoft Word. More...
 

Enumeration Type Documentation

◆ Compatibility

Specifies names of compatibility options.

Enumerator
NoTabHangInd 
NoSpaceRaiseLower 
SuppressSpBfAfterPgBrk 
WrapTrailSpaces 
PrintColBlack 
NoColumnBalance 
ConvMailMergeEsc 
SuppressTopSpacing 
UseSingleBorderforContiguousCells 
TransparentMetafiles 
ShowBreaksInFrames 
SwapBordersOddFacingPgs 
DoNotLeaveBackslashAlone 
DoNotExpandOnShiftReturn 
UlTrailSpace 
BalanceSingleByteDoubleByteWidth 
SuppressTopSpacingAtTopOfPage 
SpacingInWholePoints 
PrintBodyTextBeforeHeader 
NoLeading 
SpaceForUL 
MWSmallCaps 
SuppressTopLineSpacingWP 
TruncateFontHeightLikeWP6 
SubFontBySize 
LineWrapLikeWord6 
DoNotSuppressParagraphBorder 
NoExtraLineSpacing 
SuppressBottomSpacing 
WPSpaceWidth 
WPJustification 
UsePrinterMetrics 
ShapeLayoutLikeWW8 
FootnoteLayoutLikeWW8 
DoNotUseHtmlParagraphAutoSpacing 
AdjustLineHeightInTable 
ForgetLastTabAlignment 
AutoSpaceLikeWord95 
AlignTableRowByRow 
LayoutRawTableWidth 
LayoutTableRowsApart 
UseWord97LineBreakRules 
DoNotBreakWrappedTables 
doNotSnapToGridInCell 
SelectFldWithFirstOrLastChar 
ApplyBreakingRules 
DoNotWrapTextWithPunct 
DoNotUseEastAsianBreakRules 
UseWord2002TableStyleRules 
GrowAutofit 
UseNormalStyleForList 
DoNotUseIndentAsNumberingTabStop 
UseAltKinsokuLineBreakRules 
AllowSpaceOfSameStyleInTable 
DoNotSuppressIndentation 
DoNotAutofitConstrainedTables 
AutofitToFirstFixedWidthCell 
UnderlineTabInNumList 
DisplayHangulFixedWidth 
SplitPgBreakAndParaMark 
DoNotVertAlignCellWithSp 
DoNotBreakConstrainedForcedTable 
DoNotVertAlignInTxbx 
UseAnsiKerningPairs 
CachedColBalance 
UseFELayout 
UICompat97To2003 
OverrideTableStyleFontSizeAndJustification 
DisableOpenTypeFontFormattingFeatures 
SwapInsideAndOutsideForMirrorIndentsAndRelativePositioning 
UseWord2010TableStyleRules 

◆ MailMergeCheckErrors

Specifies how Microsoft Word will report errors detected during mail merge.

See also
Aspose::Words::Settings::MailMergeSettings::get_CheckErrors
Enumerator
Simulate 

Simulate the merge and report errors in a new document.

PauseOnError 

Complete the merge and pause to report errors.

CollectErrors 

Complete the merge and report errors in a new document.

Default 

Equals to the PauseOnError value.

◆ MailMergeDataType

Specifies the type of an external mail merge data source.

See also
Aspose::Words::Settings::MailMergeSettings::get_DataType
Enumerator
None 

No mail merge data source is specified.

TextFile 

Specifies that a given document has been connected to a text file via the Dynamic Data Exchange (DDE) system.

Database 

Specifies that a given document has been connected to an Access database via the Dynamic Data Exchange (DDE) system.

Spreadsheet 

Specifies that a given document has been connected to an Excel spreadsheet via the Dynamic Data Exchange (DDE) system.

Query 

Specifies that a given document has been connected to an external data source using an external query tool.

Odbc 

Specifies that a given document has been connected to an external data source via the Open Database Connectivity interface.

Native 

Specifies that a given document has been connected to an external data source via the Office Data Source Object (ODSO) interface.

Default 

Equals to None.

◆ MailMergeDestination

Specifies the possible results which may be generated when a mail merge is carried out on a document.

See also
Aspose::Words::Settings::MailMergeSettings::get_Destination
Enumerator
NewDocument 

Specifies that conforming hosting applications shall generate new documents by populating the fields within a given document with data from the specified external data source.

Printer 

Specifies that conforming hosting applications shall print the documents that result from populating the fields within a given document with external data from the specified external data source.

Email 

Specifies that conforming hosting applications shall generate emails using the documents that result from populating the fields within a given document with data from the specified external data source.

Fax 

Specifies that conforming hosting applications shall generate faxes using the documents that result from populating the fields within a given document with data from the specified external data source.

Default 

Equals to the NewDocument value.

◆ MailMergeMainDocumentType

Specifies the possible types for a mail merge source document.

See also
Aspose::Words::Settings::MailMergeSettings::get_MainDocumentType
Enumerator
NotAMergeDocument 

This document is not a mail merge document.

FormLetters 

Specifies that the mail merge source document is of the form letter type.

MailingLabels 

Specifies that the mail merge source document is of the mailing label type.

Envelopes 

Specifies that the mail merge source document is of the envelope type.

Catalog 

Specifies that the mail merge source document is of the catalog type.

Email 

Specifies that the mail merge source document is of the e-mail message type.

Fax 

Specifies that the mail merge source document is of the fax type.

Default 

Equals to NotAMergeDocument

◆ MsWordVersion

Allows Aspose.Wods to mimic MS Word version-specific application behavior.

Enumerator
Word2000 

Optimize Aspose.Words behavior to match MS Word 2000 version.

Word2002 

Optimize Aspose.Words behavior to match MS Word 2002 version.

Word2003 

Optimize Aspose.Words behavior to match MS Word 2003 version.

Word2007 

Optimize Aspose.Words behavior to match MS Word 2007 version.

Word2010 

Optimize Aspose.Words behavior to match MS Word 2010 version.

Word2013 

Optimize Aspose.Words behavior to match MS Word 2013 version.

Word2016 

Optimize Aspose.Words behavior to match MS Word 2016 version.

Word2019 

Optimize Aspose.Words behavior to match MS Word 2019 version.

◆ MultiplePagesType

Specifies how document is printed out.

Enumerator
Normal 

Normal printing, no multiple pages specified.

MirrorMargins 

Swaps left and right margins on facing pages.

TwoPagesPerSheet 

Prints two pages per sheet.

BookFoldPrinting 

Specifies whether to print the document as a book fold.

BookFoldPrintingReverse 

Specifies whether to print the document as a reverse book fold.

Default 

Default value is Normal

◆ OdsoDataSourceType

Specifies the type of the external data source to be connected to as part of the ODSO connection information.

The OOXML specification is very vague for this enum. I guess it might correspond to the WdMergeSubType enumeration http://msdn.microsoft.com/en-us/library/bb237801.aspx.

See also
Aspose::Words::Settings::Odso::get_DataSourceType
Enumerator
Text 

Specifies that a given document has been connected to a text file. Possibly wdMergeSubTypeOther.

Database 

Specifies that a given document has been connected to a database. Possibly wdMergeSubTypeAccess.

AddressBook 

Specifies that a given document has been connected to an address book of contacts. Possibly wdMergeSubTypeOAL.

Document1 

Specifies that a given document has been connected to another document format supported by the producing application. Possibly wdMergeSubTypeOLEDBWord.

Document2 

Specifies that a given document has been connected to another document format supported by the producing application. Possibly wdMergeSubTypeWorks.

Native 

Specifies that a given document has been connected to another document format native to the producing application. Possibly wdMergeSubTypeOLEDBText.

Email 

Specifies that a given document has been connected to an e-mail application. Possibly wdMergeSubTypeOutlook.

None 

The type of the external data source is not specified. Possibly wdMergeSubTypeWord.

Legacy 

Specifies that a given document has been connected to a legacy document format supported by the producing application Possibly wdMergeSubTypeWord2000.

Master 

Specifies that a given document has been connected to a data source which aggregates other data sources.

Default 

Equals to None.

◆ OdsoFieldMappingType

Specifies the possible types used to indicate if a given mail merge field has been mapped to a column in the given external data source.

See also
Aspose::Words::Settings::OdsoFieldMapData::get_Type
Enumerator
Column 

Specifies that the mail merge field has been mapped to a column in the given external data source.

Null 

Specifies that the mail merge field has not been mapped to a column in the given external data source.

Default 

Equals to Null.

◆ ViewType

Possible values for the view mode in Microsoft Word.

See also
Aspose::Words::Settings::ViewOptions
Aspose::Words::Settings::ViewOptions::get_ViewType
Examples

Shows how to set a custom zoom factor, which older versions of Microsoft Word will apply to a document upon loading.

auto doc = MakeObject<Document>();
auto builder = MakeObject<DocumentBuilder>(doc);
builder->Writeln(u"Hello world!");
doc->get_ViewOptions()->set_ViewType(ViewType::PageLayout);
doc->get_ViewOptions()->set_ZoomPercent(50);
ASSERT_EQ(ZoomType::Custom, doc->get_ViewOptions()->get_ZoomType());
ASSERT_EQ(ZoomType::None, doc->get_ViewOptions()->get_ZoomType());
doc->Save(ArtifactsDir + u"ViewOptions.SetZoomPercentage.doc");
Enumerator
None 

The document shall be rendered in the default view of the application.

Reading 

The document shall be rendered in the default view of the application.

PageLayout 

The document shall be opened in a view that displays the document as it will print.

Outline 

The document shall be rendered in a view optimized for outlining or creating long documents.

Normal 

The document shall be rendered in a view optimized for outlining or creating long documents.

Web 

The document shall be rendered in a view mimicking the way this document would be displayed in a web page.

◆ ZoomType

Possible values for how large or small the document appears on the screen in Microsoft Word.

See also
Aspose::Words::Settings::ViewOptions
Aspose::Words::Settings::ViewOptions::get_ZoomType
Enumerator
Custom 

Zoom percentage is set explicitly. It is not recalculated automatically when control size changes.

None 

Indicates to use the explicit zoom percentage. Same as Custom.

FullPage 

Zoom percentage is automatically recalculated to fit one full page.

PageWidth 

Zoom percentage is automatically recalculated to fit page width.

TextFit 

Zoom percentage is automatically recalculated to fit text.