Products Downloads


French version


 

The different constants linked to the DocxToolBx DLL function parameters are listed below:



Error codes

The following error codes may be returned by the DocxToolBx functions:


Name

Value

Description

_DOCX_ERR_NO_ERROR

0

No error.

_DOCX_ERR_UNEXPECTED_ERROR

-1

Unexpected error.

_DOCX_ERR_OBJECT_NOT_FOUND

-2

Object not found.

_DOCX_ERR_OBJECT_ALREADY_EXIST

-3

Object already exists.

_DOCX_ERR_INVALID_PARAMETER

-4

Invalid parameter.

_DOCX_ERR_INVALID_PARAMETER_TYPE

-5

Invalid parameter type.

_DOCX_ERR_INVALID_PARAMETER_COUNT

-6

Number of invalid parameters.

_DOCX_ERR_IO_EXCEPTION

-7

Input/output exception.

_DOCX_ERR_DOCUMENT_EXCEPTION

-8

Document management exception.

_DOCX_ERR_INVALID_HANDLE

-9

Invalid handle.

_DOCX_ERR_INVALID_FILENAME

-10

Invalid file name.

_DOCX_ERR_INVALID_OBJECTTYPE

-11

Invalid object type.

_DOCX_ERR_XML_EXCEPTION

-12

XML exception.

_DOCX_ERR_NO_MORE_HANDLE

-13

No handle available.

_DOCX_ERR_UNKNOWN_METHOD

-14

Unknown method.

_DOCX_ERR_INVALID_STYLE

-15

Invalid style.

_DOCX_ERR_BOOKMARK_NOT_REPLACABLE

-16

Bookmark cannot be replaced.

_DOCX_ERR_OUT_OF_BOUNDS

-17

Index outside bounds or end of search.

_DOCX_ERR_NOT_IMPLEMENTED

-18

Function not implemented.



Measurement units

DocToolBx uses two different measurement units. Some measurements (font and border sizes, etc.) are expressed in points while others are expressed in the base unit, which is configurable (centimeter by default).


Name

Value

Description

_DOCX_BASE_UNIT_CENTIMETERS

1

Centimeters.

_DOCX_BASE_UNIT_INCHES

2

Inches.

_DOCX_BASE_UNIT_TWIPS

3

Twips (1 centimeter = 567 twips, 1 inch = 1440 twips).


Positioning constants

These are constants used to define positioning when inserting new elements into the document.

Generally speaking, you can insert an element (paragraph, array, etc.) into its parent (document, array cell, etc.) either in an absolute way or relative to another element contained in the parent.

These constants apply to all functions requiring an insertion position.


Name

Value

Description

_DOCX_POS_FIRST

1

Insertion at the start of an element.

_DOCX_POS_LAST

2

Insertion at the end of an element.

_DOCX_POS_BEFORE

3

Insertion before the given sibling sub-element.

_DOCX_POS_AFTER

4

Insertion after the given sibling sub-element.

_DOCX_POS_ABSOLUTE

5

Insertion at the set position.

Warning: In this case, the position starts at 0 (not at 1). The index of the first element will be set to "0".

_DOCX_POS_REPLACE

6

Insertion replacing the whole content of the parent element.


Style types

The different types of styles defined in a document are as follows:


Name

Value

Description

_DOCX_TYPE_STYLE_PARAGRAPH

paragraph

Paragraph style.

_DOCX_TYPE_STYLE_CHARACTER

character

Text style.

_DOCX_TYPE_STYLE_TABLE

table

Table style.

_DOCX_TYPE_STYLE_NUMBERING

numbering

Bulleted list style.


Horizontal paragraph alignment


Name

Value

Description

_DOCX_HALIGN_LEFT

1

Left alignment.

_DOCX_HALIGN_CENTER

2

Centered.

_DOCX_HALIGN_RIGHT

3

Right alignment.

_DOCX_HALIGN_JUSTIFY

4

Justified.

_DOCX_HALIGN_MEDIUM_KASHIDA

5

Alignment on average kashida length.

_DOCX_HALIGN_DISTRIBUTE

6

Justified (character distribution).

_DOCX_HALIGN_NUM_TAB

7

Alignment on list tabulation.

_DOCX_HALIGN_HIGH_KASHIDA

8

Alignment on high kashida length.

_DOCX_HALIGN_LOW_KASHIDA

9

Align on low kashida length.

_DOCX_HALIGN_THAI_DISTRIBUTE

10

Justified according to Thai language.


Vertical paragraph alignment


Name

Value

Description

_DOCX_VALIGN_TOP

1

Top alignment.

_DOCX_VALIGN_CENTER

2

Centered.

_DOCX_VALIGN_BASELINE

3

Baseline alignment - not applicable if the object is a cell.

_DOCX_VALIGN_BOTTOM

4

Bottom alignment.

_DOCX_VALIGN_AUTO

5

Automatic alignment - not applicable if the object is a cell.



Text properties

These constants group together the different properties used to apply a style to a text element.


Name

Value

Description

_DOCX_TEXT_PROP_ALIGN_BASELINE

1

Text aligned on the baseline.

_DOCX_TEXT_PROP_ALIGN_SUPERSCRIPT

2

Text aligned as superscript.

_DOCX_TEXT_PROP_ALIGN_SUBSCRIPT

4

Text aligned as subscript.

_DOCX_TEXT_PROP_BOLD

8

Bold text.

_DOCX_TEXT_PROP_ITALIC

16

Italic text.

_DOCX_TEXT_PROP_STRIKE

32

Strikethrough text.

_DOCX_TEXT_PROP_DOUBLE_STRIKE

64

Double strikethrough text.

_DOCX_TEXT_PROP_OUTLINE

128

Outlined text.

_DOCX_TEXT_PROP_SHADOW

256

Shadowed text.

_DOCX_TEXT_PROP_EMBOSS

1024

Embossed text.

_DOCX_TEXT_PROP_IMPRINT

2048

Imprinted text.

_DOCX_TEXT_PROP_VANISH

4096

Vanished text.

_DOCX_TEXT_PROP_RTL

8192

Text read from right to left.



Underline types


Name

Value

Description

_DOCX_UNDERLINE_SINGLE

1

Single underline.

_DOCX_UNDERLINE_WORDS

2

Underline words only.

_DOCX_UNDERLINE_DOUBLE

3

Double underline.

_DOCX_UNDERLINE_THICK

4

Thick underline.

_DOCX_UNDERLINE_DOTTED

5

Dotted underline.

_DOCX_UNDERLINE_DOTTED_HEAVY

6

Thick dotted underline.

_DOCX_UNDERLINE_DASH

7

Dashed underline.

_DOCX_UNDERLINE_DASHED_HEAVY

8

Bold dashed underline.

_DOCX_UNDERLINE_DASH_LONG

9

Long-dash underline.

_DOCX_UNDERLINE_DASH_LONG_HEAVY

10

Bold long-dash underline.

_DOCX_UNDERLINE_DOT_DASH

11

Dot-dash underline.

_DOCX_UNDERLINE_DASH_DOT_HEAVY

12

Bold dot-dash underline.

_DOCX_UNDERLINE_DOT_DOT_DASH

13

Dot-dot-dash underline.

_DOCX_UNDERLINE_DASH_DOT_DOT_HEAVY

14

Bold dash-dot-dot underline.

_DOCX_UNDERLINE_WAVE

15

Wavy underline.

_DOCX_UNDERLINE_WAVY_HEAVY

16

Thick wavy underline.

_DOCX_UNDERLINE_WAVY_DOUBLE

17

Double wavy underline.

_DOCX_UNDERLINE_NONE

18

No underline.


Types of tab marks

These constants represent the different tab marks available.


Name

Value

Description

_DOCX_TAB_LEFT

1

Left tab.

_DOCX_TAB_CENTER

2

Center tab.

_DOCX_TAB_RIGHT

3

Right tab.


Vertical sizing rules

These constants apply to setting the line height.


Name

Value

Description

_DOCX_HEIGHT_RULE_AUTO

1

Automatic height.

_DOCX_HEIGHT_RULE_LEAST

2

Height at least.

_DOCX_HEIGHT_RULE_EXACT

3

Height exactly.



Line spacing rules

These constants apply to setting the vertical spacing of lines in a paragraph.


Name

Value

Description

_DOCX_SPACING_RULE_AUTO

1

Automatic line spacing.

_DOCX_SPACING_RULE_LEAST

2

Line spacing at least.

_DOCX_SPACING_RULE_EXACT

3

Line spacing exactly.


Border selection

These constants define which borders are handled by the style functions managing element borders.

When you get the information, you need to explicitly specify the border to handle (e.g. BORDER_BOTTOM).

If you define a border style, you can apply it to several borders simultaneously by combining the values (e.g. BORDER_TOP + BORDER_LEFT + BORDER_BOTTOM + BORDER_RIGHT to apply to the whole frame).


Name

Value

Description

_DOCX_BORDER_TOP

1

Top border.

_DOCX_BORDER_LEFT

2

Left border.

_DOCX_BORDER_BOTTOM

4

Bottom border.

_DOCX_BORDER_RIGHT

8

Right border.

_DOCX_BORDER_INSIDE_H

16

Inside horizontal border.

_DOCX_BORDER_INSIDE_V

32

Inside vertical border.

_DOCX_BORDER_BETWEEN

16

Intermediate border.

_DOCX_BORDER_BAR

32

Bar border.



Types of border

These constants define element border types.


Name

Value

Description

_DOCX_BST_SINGLE

single

Single line.

_DOCX_BST_DASH_DOT_STROKED

dashDotStroked

Line with a series of alternating thick and thin dashes.

_DOCX_BST_DASHED

dashed

Dotted line.

_DOCX_BST_DASH_SMALL_GAP

dashSmallGap

Dotted line with small gaps.

_DOCX_BST_DOT_DASH

dotDash

Line with alternating dots and dashes.

_DOCX_BST_DOT_DOT_DASH

dotDotDash

Dashes.

_DOCX_BST_DOTTED

dotted

Dotted line.

_DOCX_BST_DOUBLE

double

Double line.

_DOCX_BST_DOUBLE_WAVE

doubleWave

Double wavy line.

_DOCX_BST_INSET

inset

All inset lines.

_DOCX_BST_NIL

nil

No border.

_DOCX_BST_NONE

none

No border.

_DOCX_BST_OUTSET

outset

All starting lines.

_DOCX_BST_THICK

thick

Thick line.

_DOCX_BST_THICK_THIN_LARGE_GAP

thickThinLargeGap

Thick line contained in a thin line with a large gap.

_DOCX_BST_THICK_THIN_MEDIUM_GAP

thickThinMediumGap

Thick line contained in a thin line with a medium gap.

_DOCX_BST_THICK_THIN_SMALL_GAP

thickThinSmallGap

Thick line contained in a thin line with a small gap.

_DOCX_BST_THIN_THICK_LARGE_GAP

thinThickLargeGap

Thin line contained in a thick line with a large gap.

_DOCX_BST_THIN_THICK_MEDIUM_GAP

thinThickMediumGap

Thick line contained in a thin line with a medium gap.

_DOCX_BST_THIN_THICK_SMALL_GAP

thinThickSmallGap

Thick line contained in a thin line with a small gap.

_DOCX_BST_THIN_THICK_THIN_LARGE_GAP

thinThickThinLargeGap

Thin-thick-thin dashes with a large gap.

_DOCX_BST_THIN_THICK_THIN_MEDIUM_GAP

thinThickThinMediumGap

Thin-thick-thin dashes with a medium gap.

_DOCX_BST_THIN_THICK_THIN_SMALL_GAP

thinThickThinSmallGap

Thin-thick-thin dashes with a small gap.

_DOCX_BST_THREED_EMBOSS

threeDEmboss

Line with three-step gradient, darker towards the paragraph.

_DOCX_BST_THREED_ENGRAVE

threeDEngrave

Three-step gradient.

_DOCX_BST_TRIPLE

triple

Triple line.

_DOCX_BST_WAVE

wave

Wavy line.



Types of manipulable objects

These constants represent the types of directly manipulable objects used by the DocxVaToolBx.


Name

Value

Description

_DOCX_OBJECT_TYPE_PARAGRAPH

1

Text paragraph.

_DOCX_OBJECT_TYPE_RUN

2

Text sub-element of a paragraph.

_DOCX_OBJECT_TYPE_TABLE

3

Table.

_DOCX_OBJECT_TYPE_TABLE_ROW

4

Table row.

_DOCX_OBJECT_TYPE_TABLE_CELL

5

Table cell.



Types of break

These constants represent the types of break (page, section, etc.) which can be used.


Name

Value

Description

_DOCX_BREAK_TYPE_PAGE

1

Page break.

_DOCX_BREAK_TYPE_COLUMN

2

Column break.



Type of page header or footer

These constants represent the types of page header and footer.


Name

Value

Description

_DOCX_HEADER_TYPE_DEFAULT

1

Standard.

_DOCX_HEADER_TYPE_EVEN

2

Even pages.

_DOCX_HEADER_TYPE_FIRST

3

First page.



Header or footer creation mode

These constants represent the creation modes for GetHeader and GetFooter functions.


Name

Value

Description

_DOCX_CRH_FAILS_IF_NOT_EXISTS

0

Returns an error if the requested header does not exist.

_DOCX_CRH_FALLBACK_TO_DEFAULT

1

Returns the default header (and creates it if necessary) if the requested header does not exist.

_DOCX_CRH_CREATE_IF_NOT_EXISTS

2

Creates the header if it does not exist.

_DOCX_CRH_CREATE_ALWAYS

3

Creates the header if it does not exist.



Document parameters

These are document parameters which are readable or modifiable using DocGetParameter, DocSetParameter and DocRemoveParameter functions.

These functions only manage simple parameter types (character strings, numerical, boolean or listed types).

Please refer to OpenXML documentation for the meaning of the different parameters. Be careful when modifying these parameters as no validity check is carried out during modification.


Name

Value

Description

AlignBordersAndEdges

boolean

true, false.

AlwaysMergeEmptyNamespace

boolean

true, false.

AlwaysShowPlaceholderText

boolean

true, false.

AutoFormatOverride

boolean

true, false.

AutoHyphenation

boolean

true, false.

BookFoldPrinting

boolean

true, false.

BookFoldPrintingSheets

integer


BookFoldRevPrinting

boolean

true, false.

BordersDoNotSurroundFooter

boolean

true, false.

BordersDoNotSurroundHeader

boolean

true, false.

CharacterSpacingControl

character string

doNotCompress, compressPunctuation, or compressPunctuationAndJapaneseKana.

ChartTrackingRefBased

boolean

true, false.

ClickAndTypeStyle

character string


ConflictMode

character string

true, false, on, off, 0, 1.

ConsecutiveHyphenLimit

integer


DecimalSymbol

character string


DefaultImageDpi

integer


DefaultTableStyle

character string


DefaultTabStop

numeric

Measurement converted into the selected unit (centimeters by default).

DiscardImageEditingData

character string

true, false, on, off, 0, 1.

DisplayBackgroundShape

boolean

true, false.

DisplayHorizontalDrawingGridEvery

integer


DisplayVerticalDrawingGridEvery

integer


DocId14

character string


DocId15

character string


DocumentType

character string

notSpecified, letter, or eMail.

DoNotAutoCompressPictures

boolean

true, false.

DoNotDemarcateInvalidXml

boolean

true, false.

DoNotDisplayPageBoundaries

boolean

true, false.

DoNotEmbedSmartTags

boolean

true, false.

DoNotHyphenateCaps

boolean

true, false.

DoNotIncludeSubdocsInStats

boolean

true, false.

DoNotShadeFormData

boolean

true, false.

DoNotTrackFormatting

boolean

true, false.

DoNotTrackMoves

boolean

true, false.

DoNotUseMarginsForDrawingGridOrigin

boolean

true, false.

DoNotValidateAgainstSchema

boolean

true, false.

DrawingGridHorizontalOrigin

numeric

Measurement converted into the selected unit (centimeters by default).

DrawingGridHorizontalSpacing

numeric

Measurement converted into the selected unit (centimeters by default).

DrawingGridVerticalOrigin

numeric

Measurement converted into the selected unit (centimeters by default).

DrawingGridVerticalSpacing

numeric

Measurement converted into the selected unit (centimeters by default).

EmbedSystemFonts

boolean

true, false.

EmbedTrueTypeFonts

boolean

true, false.

EvenAndOddHeaders

boolean

true, false.

FormsDesign

boolean

true, false.

GutterAtTop

boolean

true, false.

HideGrammaticalErrors

boolean

true, false.

HideSpellingErrors

boolean

true, false.

HyphenationZone

numeric

Measurement converted into the selected unit (centimeters by default).

Ignorable

character string


IgnoreMixedContent

boolean

true, false.

LinkStyles

boolean

true, false.

ListSeparator

character string


MirrorMargins

boolean

true, false.

NoLineBreaksAfter

character string


NoLineBreaksBefore

character string


NoPunctuationKerning

boolean

true, false.

PrintFormsData

boolean

true, false.

PrintFractionalCharacterWidth

boolean

true, false.

PrintPostScriptOverText

boolean

true, false.

PrintTwoOnOne

boolean

true, false.

RemoveDateAndTime

boolean

true, false.

RemovePersonalInformation

boolean

true, false.

SaveFormsData

boolean

true, false.

SaveInvalidXml

boolean

true, false.

SavePreviewPicture

boolean

true, false.

SaveSubsetFonts

boolean

true, false.

SaveXmlDataOnly

boolean

true, false.

ShowEnvelope

boolean

true, false.

ShowXMLTags

boolean

true, false.

StrictFirstAndLastChars

boolean

true, false.

StyleLockQFSet

boolean

true, false.

StyleLockTheme

boolean

true, false.

StylePaneFormatFilter

character string


StylePaneSortMethod

character string


SummaryLength

integer


ThemeFontLang

character string


TrackRevisions

boolean

true, false.

UiCompat97To2003

boolean

true, false.

UpdateFields

boolean

true, false.

UseXSLTWhenSaving

boolean

true, false.

View

character string

none, print, outline, masterPages, normal, or web.

Zoom

character string

none, fullPage, bestFit, or textFit.




Click below for further details about:


↑ Top of page

  • Aucune étiquette