OfficeDoc properties

  + indicates the property is supported and relevant in both Demo and Professional versions (property name is green)
  P indicates the property is supported and relevant in the Professional version only
  x indicates the property is unsupported or irrelevant in this mode or document format
  
  All property names are case-insensitive; a few property values are case-sensitive, depending on Office.
Property Name Action Type Doc Type Units Possible values Default value if unused Description
Open Read Write Format Close XLS DOC PPT
'Mode'+xxxx +++ string'read' / 'write' / 'append''read'Indicates the read/write mode of the opened file
'Display'+xxxx +++ booleantrue/false/1/0/'on'/'off'falseIndicates whether to display or hide the opened file
'Sheet'PPPPx Pxx integer or stringpositive integer index or sheet namelast savedIndicates the required XLS worksheet
'Page'PPPPx xPP integerpositive integer indexDOC: last saved;
PPT: 1
Indicates the required DOC/PPT page number; for XLS use the 'Sheet' property
'Slide'PPPPx xxP integerpositive integer index1Indicates the required PPT slide number (same as 'Page')
'Range'PPPPx PPP XLS: string;
DOC/PPT: 2 integers
XLS: 'A1' or 'A1:C4' format;
DOC/PPT: [startChar#,endChar#]
noneSelected range: absolute (XLS) or relative to current position (DOC/PPT)
'Line'PPPPx xPx integerpositive integer indexnoneSelected line number relative to current position; 0 = start of document
'DivType'xPxxx xPx string'Characters' / 'Words' / 'Sentences' / 'Paragraphs' / 'Content''Content'Defines textual divisions in the returned data
'Title'xx+xx +++ stringanythingnoneSheet/page/slide title
'Data'xx+xx +++ string/ numeric/ matrix/ cell-array/...anythingnoneData values to be written
'Image' or 'Picture'xx+xx +++ string or numberimage filename or figure handlenoneImage to be inserted
'Meta'xxPxx PPP booleantrue/false/1/0/'on'/'off'falseIndicates that figure image should be pasted as meta-info, not screenshot. Note: this might fail if Adobe Acrobat is installed
'NewPage'xxPxx xPx booleantrue/false/1/0/'on'/'off'falseIndicates that a page-break should be inserted before the data. Also see 'PageBreakBefore' property below
'HeaderText'xxPPx PPx stringanything'' = emptyIndicates header text for the current worksheet (XLS) or the entire document (DOC). Unavailable in PPT
'FooterText'xxPPx PPP stringanythingfilenameIndicates footer text for the current worksheet (XLS), current slide (PPT) or the entire document (DOC). Use '' to hide
'Save'xxPPx PPP booleantrue/false/1/0/'on'/'off'falseIf true, save the document after modification (false = much faster)
'PageOrientation'xxPPx PPP string'Landscape' / 'Portrait'none (system dependent)Page orientation
'BgPicture'xxPPx PPP stringfilename''Background image for the current worksheet/page/slide; Use '' to remove
'Bgcolor' or 'Background'xxPPx PPP string or numeric vectorall valid Matlab colors (e.g., 'g','green' or [0,1,0])'white'Font background color. PPT: also see 'SlideColor' below
'FontName'xxPPx PPP stringvalid font namenoneFont name (e.g., 'Times New Roman' or 'Arial')
'FontSize'xxPPx PPP numberpositive numbernone (normally 10 or 12)Font size (e.g., 13)
'Underline'xxPPx PPP integerXLS: 0-2;
DOC: 0-4;
PPT: 0/1
0 = no lineUnderline font (0=none, 1=single, 2=double, 3=thick, 4=words); Matlab7 also accepts strings: 'wdUnderlineWords' etc.
'Fgcolor' or 'Foreground'xx++x +++ string or numeric vectorall valid Matlab colors (e.g., 'g','green' or [0,1,0])'black'Font foreground color
'Bold'xx++x +++ booleantrue/false/1/0/'on'/'off'falseBold font
'Italic'xxPPx PPP booleantrue/false/1/0/'on'/'off'falseItalic font
'Subscript'xxPPx PPP booleantrue/false/1/0/'on'/'off'falseSubscript font
'Superscript'xxPPx PPP booleantrue/false/1/0/'on'/'off'falseSuperscript font
'Shadow'xxPPx PPP booleantrue/false/1/0/'on'/'off'falseShadowed font
'Strikethrough'xxPPx PPx booleantrue/false/1/0/'on'/'off'falseStrikethrough font. Unavailable in PPT
'Emboss'xxPPx xPP booleantrue/false/1/0/'on'/'off'falseEmbossed font. Unavailable in XLS
'WrapText'xxPPx PxP booleantrue/false/1/0/'on'/'off'falseWrap text within cell(s) / box. Unavailable in DOC
'TextOrientation'xxPPx PxP degreesXLS: -90:90;
PPT: 0 or -90
0 = EastwardIndicates text direction: -90=downward, +90=upward. PPT only accepts 0 or -90; XLS accepts full range; Unavailable in DOC
'NumberFormat'xxPPx Pxx stringany valid format specifiernoneCell format specifier (e.g., '#,##0_);[Red](#,##0)')
'RowHeight'xxPPx Pxx numberpositive numbersystem dependentXLS row height (e.g., 12.75)
'ColWidth'xxPPx Pxx numberpositive numbersystem dependentXLS column width (e.g., 8.5)
'RowAutoFit'xxPPx Pxx booleantrue/false/1/0/'on'/'off'falseAuto-fit selected XLS row(s) according to the contained value(s)
'ColAutoFit'xxPPx Pxx booleantrue/false/1/0/'on'/'off'falseAuto-fit selected XLS column(s) according to the contained value(s)
'RowHidden'xxPPx Pxx booleantrue/false/1/0/'on'/'off'falseHides or unhides the selected XLS row(s)
'ColHidden'xxPPx Pxx booleantrue/false/1/0/'on'/'off'falseHides or unhides the selected XLS column(s)
'SheetHidden'xxPPx Pxx booleantrue/false/1/0/'on'/'off'falseHides or unhides the selected XLS worksheet
'SheetName'xxPPx Pxx stringalmost anything up to 32 charsnoneXLS worksheet (tab) name
'SheetProtected'xxPPx Pxx booleantrue/false/1/0/'on'/'off'falseProtects or unprotects the selected XLS worksheet
'SheetScaling'xxPPx Pxx string'#%' or '#x#''100%'Set XLS worksheet print scaling to the specified % or W-by-H pages. Examples: '75%' or '3x2'
Note: 'WxH' format may fail on Matlab6 or old Excel versions
'PrintArea'xxPPx Pxx string'A1' or 'A1:C4' format'' (=entire sheet)Set the XLS worksheet print-area
'AutoImageResize'xxPPx Pxx booleantrue/false/1/0/'on'/'off'trueAutomatically resize the provided image to fit the printed XLS page
'TabColor'xxPPx Pxx string or numeric vectorall valid Matlab colors (e.g., 'g','green' or [0,1,0])'white'XLS worksheet tab color; ''=white
'Valign'xxPPx Pxx string'top' / 'center' / 'bottom' / 'justify''bottom'Vertical cell alignment
'Halign'xxPPx PPx string'right' / 'center' / 'left' / 'justify'
XLS: also 'fill' / 'general'
'general'Horizontal cell/paragraph alignment. Unavailable in PPT
'EdgeLeft'xxPPx PPx number or cell arrayweight (0/0.5/1/1.5/2/3/4) or {weight,color}noneLeft border. Set weight to [] or 0 to remove this border. Note: this property fails in Matlab 6 (ok in 7). Unavailable in PPT
'EdgeRight'xxPPx PPx number or cell arrayweight (0/0.5/1/1.5/2/3/4) or {weight,color}noneLeft border. Set weight to [] or 0 to remove this border. Note: this property fails in Matlab 6 (ok in 7). Unavailable in PPT
'EdgeTop'xxPPx PPx number or cell arrayweight (0/0.5/1/1.5/2/3/4) or {weight,color}noneLeft border. Set weight to [] or 0 to remove this border. Note: this property fails in Matlab 6 (ok in 7). Unavailable in PPT
'EdgeBottom'xxPPx PPx number or cell arrayweight (0/0.5/1/1.5/2/3/4) or {weight,color}noneLeft border. Set weight to [] or 0 to remove this border. Note: this property fails in Matlab 6 (ok in 7). Unavailable in PPT
'AllCaps'xxPPx xPx booleantrue/false/1/0/'on'/'off'falseAll-caps font: lowercase 'a' looks exactly like uppercase 'A'
'SmallCaps'xxPPx xPx booleantrue/false/1/0/'on'/'off'falseSmall-caps font: lowercase 'a' looks like a small uppercase 'A'
'WidowControl'xxPPx xPx booleantrue/false/1/0/'on'/'off'falseDOC paragraph widow/orphan control
'KeepWithNext'xxPPx xPx booleantrue/false/1/0/'on'/'off'falseDOC paragraph "Keep-with-next" (keep next paragraph on same page)
'KeepTogether'xxPPx xPx booleantrue/false/1/0/'on'/'off'falseDOC paragraph "Keep-Together" (keep this paragraph on same page)
'PageBreakBefore'xxPPx xPx booleantrue/false/1/0/'on'/'off'falseDOC paragraph "Page-Break-Before" (start paragraph on top of new page). Also see 'NewPage' property above
'LineSpacing'xxPPx xPP numberpositive number1Spacing between lines: 1/1.5/2 indicate single-double spacing; any other value is treated as an exact number of [points]. Matlab7 also accepts strings: 'wdLineSpaceSingle' etc. Unavailable in XLS
'SpaceBefore'xxPPx xPP numberpositive number0.2Spacing before selected line(s) in [points]. Unavailable in XLS
'SpaceAfter'xxPPx xPP numberpositive number0Spacing after selected line(s) in [points]. Unavailable in XLS
'Bullet'xxPPx xPP string'None' / 'Numbered' / 'Unnumbered' or 'Bullet''None'Bullet/numberring type (unnumbered = bullet). Unavailable in XLS
'LeftIndent'xxPPx xPP numberpositive number0Left paragraph indent in [points]. Unavailable in XLS
'RightIndent'xxPPx xPP numberpositive number0Right paragraph indent in [points]. Unavailable in XLS
'IndentLevel'xxPPx xxP integerpositive integer1PPT indentation level. Default = leftmost indent = 1
'SlideHidden'xxPPx xxP booleantrue/false/1/0/'on'/'off'falseHides or unhides the selected PPT slide
'SlideColor'xxPPx xxP string or numeric vectorall valid Matlab colors (e.g., 'g','green' or [0,1,0])'white'PPT slide background color; ''=white. Note: 'BgColor' sets the text frame color, not the slide color
'Release'xxxx+ +++ booleantrue/false/1/0/'on'/'off'true = releaseIndicates whether or not to release the COM server from memory after closing the file (recommended unless the same server will be reused shortly).
'DelStd'xxxxP Pxx booleantrue/false/1/0/'on'/'off'falseDeletes the standard XLS worksheets. Note that XLS files must have at least one sheet, so if the file has only the standard sheets, then the last one will not be deleted.

Back to OfficeDoc product page