#include-once ;Table Word Developer Reference Office 2007 ; #CONSTANTS# =================================================================================================================== ;Specifies the border style for an object. ; See: http://msdn.microsoft.com/en-us/library/bb213915%28v=office.12%29.aspx ;expression.LineStyle Global Const $wdLineStyleDashDot = 5 ;A dash followed by a dot. Global Const $wdLineStyleDashDotDot = 6 ;A dash followed by two dots. Global Const $wdLineStyleDashDotStroked = 20 ;A dash followed by a dot stroke, thus rendering a border similar to a barber pole. Global Const $wdLineStyleDashLargeGap = 4 ;A dash followed by a large gap. Global Const $wdLineStyleDashSmallGap = 3 ;A dash followed by a small gap. Global Const $wdLineStyleDot = 2 ;Dots. Global Const $wdLineStyleDouble = 7 ;Double solid lines. Global Const $wdLineStyleDoubleWavy = 19 ;Double wavy solid lines. Global Const $wdLineStyleEmboss3D = 21 ;The border appears to have a 3-D embossed look. Global Const $wdLineStyleEngrave3D = 22 ;The border appears to have a 3-D engraved look. Global Const $wdLineStyleInset = 24 ;The border appears to be inset. Global Const $wdLineStyleNone = 0 ;No border. Global Const $wdLineStyleOutset = 23 ;The border appears to be outset. Global Const $wdLineStyleSingle = 1 ;A single solid line. Global Const $wdLineStyleSingleWavy = 18 ;A single wavy solid line. Global Const $wdLineStyleThickThinLargeGap = 16 ;An internal single thick solid line surrounded by a single thin solid line with a large gap between them. Global Const $wdLineStyleThickThinMedGap = 13 ;An internal single thick solid line surrounded by a single thin solid line with a medium gap between them. Global Const $wdLineStyleThickThinSmallGap = 10 ;An internal single thick solid line surrounded by a single thin solid line with a small gap between them. Global Const $wdLineStyleThinThickLargeGap = 15 ;An internal single thin solid line surrounded by a single thick solid line with a large gap between them. Global Const $wdLineStyleThinThickMedGap = 12 ;An internal single thin solid line surrounded by a single thick solid line with a medium gap between them. Global Const $wdLineStyleThinThickSmallGap = 9 ;An internal single thin solid line surrounded by a single thick solid line with a small gap between them. Global Const $wdLineStyleThinThickThinLargeGap = 17 ;An internal single thin solid line surrounded by a single thick solid line surrounded by a single thin solid line with a large gap between all lines. Global Const $wdLineStyleThinThickThinMedGap = 14 ;An internal single thin solid line surrounded by a single thick solid line surrounded by a single thin solid line with a medium gap between all lines. Global Const $wdLineStyleThinThickThinSmallGap = 11 ;An internal single thin solid line surrounded by a single thick solid line surrounded by a single thin solid line with a small gap between all lines. Global Const $wdLineStyleTriple = 8 ;Three solid thin lines. ;Specifies whether a line is a line of text or a table row. ;expression.LineType Global Const $wdTableRow = 1 ;A table row. Global Const $wdTextLine = 0 ;A line of text in the body of the document. ;Specifies the width of an object's border. ;expression.LineWidth Global Const $wdLineWidth025pt = 2 Global Const $wdLineWidth050pt = 4 Global Const $wdLineWidth075pt = 6 Global Const $wdLineWidth100pt = 8 Global Const $wdLineWidth150pt = 12 Global Const $wdLineWidth225pt = 18 Global Const $wdLineWidth300pt = 24 Global Const $wdLineWidth450pt = 36 Global Const $wdLineWidth600pt = 48 ;Specifies the type of border to be used. Enum WdBorderType ;Selection.Borders(wdBorderTop).LineStyle = wdLineStyleSingle Global Const $wdBorderBottom = -3 Global Const $wdBorderDiagonalDown = -7 Global Const $wdBorderDiagonalUp = -8 Global Const $wdBorderHorizontal = -5 Global Const $wdBorderLeft = -2 Global Const $wdBorderRight = -4 Global Const $wdBorderTop = -1 Global Const $wdBorderVertical = -6 ;Specifies whether a page border is measured from the edge of the page or from the text it surrounds. ;expression.DistanceFrom Global Const $wdBorderDistanceFromPageEdge = 1 Global Const $wdBorderDistanceFromText = 0 ;Specifies the 24-bit color to apply. ;expression.Color Global Const $wdColorAqua = 13421619 Global Const $wdColorAutomatic = -16777216 Global Const $wdColorBlack = 0 Global Const $wdColorBlue = 16711680 Global Const $wdColorBlueGray = 10053222 Global Const $wdColorBrightGreen = 65280 Global Const $wdColorBrown = 13209 Global Const $wdColorDarkBlue = 8388608 Global Const $wdColorDarkGreen = 13056 Global Const $wdColorDarkRed = 128 Global Const $wdColorDarkTeal = 6697728 Global Const $wdColorDarkYellow = 32896 Global Const $wdColorGold = 52479 Global Const $wdColorGray05 = 15987699 Global Const $wdColorGray10 = 15132390 Global Const $wdColorGray125 = 14737632 Global Const $wdColorGray15 = 14277081 Global Const $wdColorGray20 = 13421772 Global Const $wdColorGray25 = 12632256 Global Const $wdColorGray30 = 11776947 Global Const $wdColorGray35 = 10921638 Global Const $wdColorGray375 = 10526880 Global Const $wdColorGray40 = 10066329 Global Const $wdColorGray45 = 9211020 Global Const $wdColorGray50 = 8421504 Global Const $wdColorGray55 = 7566195 Global Const $wdColorGray60 = 6710886 Global Const $wdColorGray625 = 6316128 Global Const $wdColorGray65 = 5855577 Global Const $wdColorGray70 = 5000268 Global Const $wdColorGray75 = 4210752 Global Const $wdColorGray80 = 3355443 Global Const $wdColorGray85 = 2500134 Global Const $wdColorGray875 = 2105376 Global Const $wdColorGray90 = 1644825 Global Const $wdColorGray95 = 789516 Global Const $wdColorGreen = 32768 Global Const $wdColorIndigo = 10040115 Global Const $wdColorLavender = 16751052 Global Const $wdColorLightBlue = 16737843 Global Const $wdColorLightGreen = 13434828 Global Const $wdColorLightOrange = 39423 Global Const $wdColorLightTurquoise = 16777164 Global Const $wdColorLightYellow = 10092543 Global Const $wdColorLime = 52377 Global Const $wdColorOliveGreen = 13107 Global Const $wdColorOrange = 26367 Global Const $wdColorPaleBlue = 16764057 Global Const $wdColorPink = 16711935 Global Const $wdColorPlum = 6697881 Global Const $wdColorRed = 255 Global Const $wdColorRose = 13408767 Global Const $wdColorSeaGreen = 6723891 Global Const $wdColorSkyBlue = 16763904 Global Const $wdColorTan = 10079487 Global Const $wdColorTeal = 8421376 Global Const $wdColorTurquoise = 16776960 Global Const $wdColorViolet = 8388736 Global Const $wdColorWhite = 16777215 Global Const $wdColorYellow = 65535 ;Specifies the color of highlighting for table cells that were added, deleted, or merged in the current document. ;expression.InsertedCellColor Global Const $wdCellColorByAuthor = -1 ;Highlighting color determined by reviewer. Global Const $wdCellColorLightBlue = 2 ;Light blue. Global Const $wdCellColorLightGray = 7 ;Light gray. Global Const $wdCellColorLightGreen = 6 Global Const $wdCellColorLightOrange = 5 Global Const $wdCellColorLightPurple = 4 Global Const $wdCellColorLightYellow = 3 Global Const $wdCellColorNoHighlight = 0 Global Const $wdCellColorPink = 1 ;Specifies the shading texture to use for a selected item. ;http://msdn.microsoft.com/en-us/library/bb213996%28v=office.12%29.aspx ;ActiveDocument.Tables(1).Rows(1).Shading.Texture = wdTextureHorizontal Global Const $wdTexture10Percent = 100 Global Const $wdTexture12Pt5Percent = 125 Global Const $wdTexture15Percent = 150 Global Const $wdTexture17Pt5Percent = 175 Global Const $wdTexture20Percent = 200 Global Const $wdTexture22Pt5Percent = 225 Global Const $wdTexture25Percent = 250 Global Const $wdTexture27Pt5Percent = 275 Global Const $wdTexture2Pt5Percent = 25 Global Const $wdTexture30Percent = 300 Global Const $wdTexture32Pt5Percent = 325 Global Const $wdTexture35Percent = 350 Global Const $wdTexture37Pt5Percent = 375 Global Const $wdTexture40Percent = 400 Global Const $wdTexture42Pt5Percent = 425 Global Const $wdTexture45Percent = 450 Global Const $wdTexture47Pt5Percent = 475 Global Const $wdTexture50Percent = 500 Global Const $wdTexture52Pt5Percent = 525 Global Const $wdTexture55Percent = 550 Global Const $wdTexture57Pt5Percent = 575 Global Const $wdTexture5Percent = 50 Global Const $wdTexture60Percent = 600 Global Const $wdTexture62Pt5Percent = 625 Global Const $wdTexture65Percent = 650 Global Const $wdTexture67Pt5Percent = 675 Global Const $wdTexture70Percent = 700 Global Const $wdTexture72Pt5Percent = 725 Global Const $wdTexture75Percent = 750 Global Const $wdTexture77Pt5Percent = 775 Global Const $wdTexture7Pt5Percent = 75 Global Const $wdTexture80Percent = 800 Global Const $wdTexture82Pt5Percent = 825 Global Const $wdTexture85Percent = 850 Global Const $wdTexture87Pt5Percent = 875 Global Const $wdTexture90Percent = 900 Global Const $wdTexture92Pt5Percent = 925 Global Const $wdTexture95Percent = 950 Global Const $wdTexture97Pt5Percent = 975 Global Const $wdTextureCross = -11 Global Const $wdTextureDarkCross = -5 Global Const $wdTextureDarkDiagonalCross = -6 Global Const $wdTextureDarkDiagonalDown = -3 Global Const $wdTextureDarkDiagonalUp = -4 Global Const $wdTextureDarkHorizontal = -1 Global Const $wdTextureDarkVertical = -2 Global Const $wdTextureDiagonalCross = -12 Global Const $wdTextureDiagonalDown = -9 Global Const $wdTextureDiagonalUp = -10 Global Const $wdTextureHorizontal = -7 Global Const $wdTextureNone = 0 Global Const $wdTextureSolid = 1000 Global Const $wdTextureVertical = -8 ;This enumeration groups together constants used with various Microsoft Word methods. ;http://msdn.microsoft.com/en-us/library/bb237579%28v=office.12%29.aspx Global Const $wdAutoPosition = 0 ;Represents the Auto value for the specified setting. Global Const $wdBackward = -1073741823 ;Indicates that selection will be extended backward using the MoveStartUntil or MoveStartWhile method of the Range or Selection object. Global Const $wdCreatorCode = 1297307460 ;Represents the creator code for objects created by Microsoft Word. Global Const $wdFirst = 1 ;Represents the first item in a collection. Global Const $wdForward = 1073741823 ;Indicates that selection will be extended forward using the MoveStartUntil or MoveStartWhile method of the Range or Selection object. Global Const $wdToggle = 9999998 ;Toggles a property's value. Global Const $wdUndefined = 9999999 ;Represents an undefined value. ;Specifies the predefined format to apply to a table.WdTableFormat ;http://msdn.microsoft.com/en-us/library/bb238267%28v=office.12%29.aspx ;expression.AutoFormat(Format, AppliquerBordures, AppliquerOmbrage, AppliquerPolice, AppliquerCouleur, AppliquerLignesTitres, AppliquerDernièreLigne, AppliquerPremièreColonne, AppliquerDernièreColonne, Ajuster) Global Const $wdTableFormat3DEffects1 = 32 Global Const $wdTableFormat3DEffects2 = 33 Global Const $wdTableFormat3DEffects3 = 34 Global Const $wdTableFormatClassic1 = 4 Global Const $wdTableFormatClassic2 = 5 Global Const $wdTableFormatClassic3 = 6 Global Const $wdTableFormatClassic4 = 7 Global Const $wdTableFormatColorful1 = 8 Global Const $wdTableFormatColorful2 = 9 Global Const $wdTableFormatColorful3 = 10 Global Const $wdTableFormatColumns1 = 11 Global Const $wdTableFormatColumns2 = 12 Global Const $wdTableFormatColumns3 = 13 Global Const $wdTableFormatColumns4 = 14 Global Const $wdTableFormatColumns5 = 15 Global Const $wdTableFormatContemporary = 35 Global Const $wdTableFormatElegant = 36 Global Const $wdTableFormatGrid1 = 16 Global Const $wdTableFormatGrid2 = 17 Global Const $wdTableFormatGrid3 = 18 Global Const $wdTableFormatGrid4 = 19 Global Const $wdTableFormatGrid5 = 20 Global Const $wdTableFormatGrid6 = 21 Global Const $wdTableFormatGrid7 = 22 Global Const $wdTableFormatGrid8 = 23 Global Const $wdTableFormatList1 = 24 Global Const $wdTableFormatList2 = 25 Global Const $wdTableFormatList3 = 26 Global Const $wdTableFormatList4 = 27 Global Const $wdTableFormatList5 = 28 Global Const $wdTableFormatList6 = 29 Global Const $wdTableFormatList7 = 30 Global Const $wdTableFormatList8 = 31 Global Const $wdTableFormatNone = 0 Global Const $wdTableFormatProfessional = 37 Global Const $wdTableFormatSimple1 = 1 Global Const $wdTableFormatSimple2 = 2 Global Const $wdTableFormatSimple3 = 3 Global Const $wdTableFormatSubtle1 = 38 Global Const $wdTableFormatSubtle2 = 39 Global Const $wdTableFormatWeb1 = 40 Global Const $wdTableFormatWeb2 = 41 Global Const $wdTableFormatWeb3 = 42 ;expression.Add(Étendue, NumLignes, NumColonnes, ComportementTableauParDéfaut, ComportementAjustAuto) ;Specifies whether Microsoft Word automatically resizes cells in a table to fit the contents (AutoFit). Global Const $wdWord8TableBehavior = 0 ;Disables AutoFit. Default. Global Const $wdWord9TableBehavior = 1 ;Enables AutoFit. ;Specifies how Microsoft Word resizes a table when the AutoFit feature is used. Global Const $wdAutoFitContent = 1 ;The table is automatically sized to fit the content contained in the table. Global Const $wdAutoFitFixed = 0 ;The table is set to a fixed size, regardless of the content, and is not automatically sized. Global Const $wdAutoFitWindow = 2 ;The table is automatically sized to the width of the active window. ;expression.ConvertToText(Séparateur, TableauxImbriqués) ;Specifies the character to use to separate text into cells when converting text to a table, or to delimit converted columns when converting a table to text (paragraph marks delimit converted rows). Global Const $wdSeparateByCommas = 2 ;A comma. Global Const $wdSeparateByDefaultListSeparator = 3 ;The default list separator. Global Const $wdSeparateByParagraphs = 0 ;Paragraph markers. Global Const $wdSeparateByTabs = 1 ;A tab. ;Specifies how table formatting should be applied.WdTableFormatApply Global Const $wdTableFormatApplyAutoFit = 16 ;AutoFit. Global Const $wdTableFormatApplyBorders = 1 ;Borders. Global Const $wdTableFormatApplyColor = 8 ;Color. Global Const $wdTableFormatApplyFirstColumn = 128 ;Apply AutoFormat to first column. Global Const $wdTableFormatApplyFont = 4 ;Font. Global Const $wdTableFormatApplyHeadingRows = 32 ;Apply AutoFormat to heading rows. Global Const $wdTableFormatApplyLastColumn = 256 ;Apply AutoFormat to last column. Global Const $wdTableFormatApplyLastRow = 64 ;Apply AutoFormat to last row. Global Const $wdTableFormatApplyShading = 2 ;Shading. ;Specifies the relative position of a table in the document. ;expression.HorizontalPosition Global Const $wdTableBottom = -999997 Global Const $wdTableCenter = -999995 Global Const $wdTableInside = -999994 ;Placed inside a range. Global Const $wdTableLeft = -999998 ;Aligned to the left side of the document. Global Const $wdTableOutside = -999993 ;Placed outside a range. Global Const $wdTableRight = -999996 Global Const $wdTableTop = -999999 ;Specifies a unit of measure to use.WdUnits Enumeration ;http://msdn.microsoft.com/en-us/library/bb214015%28v=office.12%29.aspx ;Selection.MoveRight Unit:=wdCell, Count:=1, Extend:=wdMove Global Const $wdCell = 12 Global Const $wdCharacter = 1 Global Const $wdCharacterFormatting = 13 Global Const $wdColumn = 9 Global Const $wdItem = 16 Global Const $wdLine = 5 Global Const $wdParagraph = 4 Global Const $wdParagraphFormatting = 14 Global Const $wdRow = 10 Global Const $wdScreen = 7 Global Const $wdSection = 8 Global Const $wdSentence = 3 Global Const $wdStory = 6 Global Const $wdTable = 15 Global Const $wdWindow = 11 Global Const $wdWord = 2 ;Specifies the way the selection is moved. Global Const $wdExtend= 1 ;The end of the selection is extended to the end of the specified unit. Global const $wdMove = 0 ;The selection is collapsed to an insertion point and moved to the end of the specified unit. Default. ;Specifies the vertical alignment of text in one or more cells of a table. ;expression.VerticalAlignment Global const $wdCellAlignVerticalBottom = 3 ;Text is aligned to the bottom border of the cell. Global const $wdCellAlignVerticalCenter = 1 Global const $wdCellAlignVerticalTop = 0 ;Définit l'alignement d'un paragraphe. ;expression.Alignment Global const $wdAlignParagraphCenter = 1 ;Aligné au centre. Global const $wdAlignParagraphDistribute = 4 ;Les caractères du paragraphe sont distribués équitablement pour remplir toute la largeur du paragraphe. Global const $wdAlignParagraphJustify = 3 ;Totalement justifié. Global const $wdAlignParagraphJustifyHi = 7 ;Justifié avec un rapport élévé de compression de caractères. Global const $wdAlignParagraphJustifyLow = 8 ;Justifié avec un faible rapport de compression de caractères. Global const $wdAlignParagraphJustifyMed = 5 ;Justifié avec un rapport moyen de compression de caractères. Global const $wdAlignParagraphLeft = 0 ;Aligné à gauche. Global const $wdAlignParagraphRight = 2 ;Aligné à droite. Global const $wdAlignParagraphThaiJustify = 9 ;Justifié d'après la mise en forme thaï. ;Specifies where and what type of cells to add to an existing table. ;expression.InsertCells(DécalerCellules) Global const $wdInsertCellsEntireColumn = 3 ;Inserts an entire column to the left of the column that contains the selection. Global const $wdInsertCellsEntireRow = 2 ;Inserts an entire row above the row that contains the selection. Global const $wdInsertCellsShiftDown = 1 ;Inserts new cells above the selected cells. Global const $wdInsertCellsShiftRight = 0 ;Insert new cells to the left of the selected cells. ;Specifies the type for a caption label. ;expression.InsertCaption(Libellé, Titre, InsertAutoTitre, Position, ExclureLibellé) Global const $wdCaptionEquation = -3 Global const $wdCaptionFigure = -1 Global const $wdCaptionTable = -2 ;Specifies the position of the caption label text. Global const $wdCaptionPositionAbove = 0 ;The caption label is added above. Global const $wdCaptionPositionBelow = 1 ;The caption label is added below. ; wdGoToDirection ;expression.GoTo(Quoi, Lequel, Nombre, Nom) expression.GoTo(WdGoToItem, WdGoToDirection, Nombre, Nom) Global Const $wdGoToAbsolute = 1 Global Const $wdGoToFirst = 1 Global Const $wdGoToLast = -1 Global Const $wdGoToNext = 2 Global Const $wdGoToPrevious = 3 Global Const $wdGoToRelative = 2 ; wdGoToItem Global Const $wdGoToBookmark = -1 Global Const $wdGoToSection = 0 Global Const $wdGoToPage = 1 Global Const $wdGoToTable = 2 Global Const $wdGoToLine = 3 Global Const $wdGoToFootNote = 4 Global Const $wdGoToEndNote = 5 Global Const $wdGoToComment = 6 Global Const $wdGoToField = 7 Global Const $wdGoToGraphic = 8 Global Const $wdGoToObject = 9 Global Const $wdGoToEquation = 10 Global Const $wdGoToHeading = 11 Global Const $wdGoToPercent = 12 Global Const $wdGoToSpellingError = 13 Global Const $wdGoToGrammaticalError = 14 Global Const $wdGoToProofReadingError = 15