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 Print Close XLS DOC PPT
'Mode'+xxxxx +++ string'read' / 'write' / 'append''read'Indicates the read/write mode of the opened file
'Display'+xxxxx +++ booleantrue/false/1/0/'on'/'off'falseIndicates whether to display or hide the opened file
'Sheet'PPPPxx Pxx integer or stringpositive integer index or sheet namelast savedIndicates the required XLS worksheet
'Page'PPPPxx xPP integerpositive integer indexDOC: last saved;
PPT: 1
Indicates the required DOC/PPT page number; for XLS use the 'Sheet' property
'Slide'PPPPxx xxP integerpositive integer index1Indicates the required PPT slide number (same as 'Page')
'Range'PPPPxx 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'PPPPxx xPx integerpositive integer indexnoneSelected line number relative to current position; 0 = start of document
'DivType'xPxxxx xPx string'Characters' / 'Words' / 'Sentences' / 'Paragraphs' / 'Content''Content'Defines textual divisions in the returned data
'Title'xx+xxx +++ stringanythingnoneSheet/page/slide title
'Data'xx+xxx +++ string/ numeric/ matrix/ cell-array/...anythingnoneData values to be written
'Image' or 'Picture'xx+xxx +++ string or numberimage filename or figure handlenoneImage to be inserted
'Meta'xxPxxx 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'xxPxxx xPx booleantrue/false/1/0/'on'/'off'falseIndicates that a page-break should be inserted before the data. Also see 'PageBreakBefore' property below
'HeaderText'xxPPxx PPx stringanything'' = emptyIndicates header text for the current worksheet (XLS) or the entire document (DOC). Unavailable in PPT
'FooterText'xxPPxx PPP stringanythingfilenameIndicates footer text for the current worksheet (XLS), current slide (PPT) or the entire document (DOC). Use '' to hide
'Save'xxPPxx PPP booleantrue/false/1/0/'on'/'off'falseIf true, save the document after modification (false = much faster)
'PageOrientation'xxPPxx PPP string'Landscape' / 'Portrait'none (system dependent)Page orientation
'BgPicture'xxPPxx PPP stringfilename''Background image for the current worksheet/page/slide; Use '' to remove
'Bgcolor' or 'Background'xxPPxx 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'xxPPxx PPP stringvalid font namenoneFont name (e.g., 'Times New Roman' or 'Arial')
'FontSize'xxPPxx PPP numberpositive numbernone (normally 10 or 12)Font size (e.g., 13)
'Underline'xxPPxx 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++xx +++ string or numeric vectorall valid Matlab colors (e.g., 'g','green' or [0,1,0])'black'Font foreground color
'Bold'xx++xx +++ booleantrue/false/1/0/'on'/'off'falseBold font
'Italic'xxPPxx PPP booleantrue/false/1/0/'on'/'off'falseItalic font
'Subscript'xxPPxx PPP booleantrue/false/1/0/'on'/'off'falseSubscript font
'Superscript'xxPPxx PPP booleantrue/false/1/0/'on'/'off'falseSuperscript font
'Shadow'xxPPxx PPP booleantrue/false/1/0/'on'/'off'falseShadowed font
'Strikethrough'xxPPxx PPx booleantrue/false/1/0/'on'/'off'falseStrikethrough font. Unavailable in PPT
'Emboss'xxPPxx xPP booleantrue/false/1/0/'on'/'off'falseEmbossed font. Unavailable in XLS
'WrapText'xxPPxx PxP booleantrue/false/1/0/'on'/'off'falseWrap text within cell(s) / box. Unavailable in DOC
'TextOrientation'xxPPxx 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'xxPPxx Pxx stringany valid format specifiernoneCell format specifier (e.g., '#,##0_);[Red](#,##0)')
'RowHeight'xxPPxx Pxx numberpositive numbersystem dependentXLS row height (e.g., 12.75)
'ColWidth'xxPPxx Pxx numberpositive numbersystem dependentXLS column width (e.g., 8.5)
'RowAutoFit'xxPPxx Pxx booleantrue/false/1/0/'on'/'off'falseAuto-fit selected XLS row(s) according to the contained value(s)
'ColAutoFit'xxPPxx Pxx booleantrue/false/1/0/'on'/'off'falseAuto-fit selected XLS column(s) according to the contained value(s)
'RowHidden'xxPPxx Pxx booleantrue/false/1/0/'on'/'off'falseHides or unhides the selected XLS row(s)
'ColHidden'xxPPxx Pxx booleantrue/false/1/0/'on'/'off'falseHides or unhides the selected XLS column(s)
'SheetHidden'xxPPxx Pxx booleantrue/false/1/0/'on'/'off'falseHides or unhides the selected XLS worksheet
'SheetName'xxPPxx Pxx stringalmost anything up to 32 charsnoneXLS worksheet (tab) name
'SheetProtected'xxPPxx Pxx booleantrue/false/1/0/'on'/'off'falseProtects or unprotects the selected XLS worksheet
'SheetScaling'xxPPxx 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 Matlab 6 or old Excel versions
'PrintArea'xxPPxx Pxx string'A1' or 'A1:C4' format'' (=entire sheet)Set the XLS worksheet print-area
'AutoImageResize'xxPPxx Pxx booleantrue/false/1/0/'on'/'off'trueAutomatically resize the provided image to fit the printed XLS page
'TabColor'xxPPxx Pxx string or numeric vectorall valid Matlab colors (e.g., 'g','green' or [0,1,0])'white'XLS worksheet tab color; ''=white
'Valign'xxPPxx Pxx string'top' / 'center' / 'bottom' / 'justify''bottom'Vertical cell alignment
'Halign'xxPPxx PPx string'right' / 'center' / 'left' / 'justify'
XLS: also 'fill' / 'general'
'general'Horizontal cell/paragraph alignment. Unavailable in PPT
'EdgeLeft'xxPPxx 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'xxPPxx 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'xxPPxx 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'xxPPxx 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'xxPPxx xPx booleantrue/false/1/0/'on'/'off'falseAll-caps font: lowercase 'a' looks exactly like uppercase 'A'
'SmallCaps'xxPPxx xPx booleantrue/false/1/0/'on'/'off'falseSmall-caps font: lowercase 'a' looks like a small uppercase 'A'
'WidowControl'xxPPxx xPx booleantrue/false/1/0/'on'/'off'falseDOC paragraph widow/orphan control
'KeepWithNext'xxPPxx xPx booleantrue/false/1/0/'on'/'off'falseDOC paragraph "Keep-with-next" (keep next paragraph on same page)
'KeepTogether'xxPPxx xPx booleantrue/false/1/0/'on'/'off'falseDOC paragraph "Keep-Together" (keep this paragraph on same page)
'PageBreakBefore'xxPPxx 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'xxPPxx 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'xxPPxx xPP numberpositive number0.2Spacing before selected line(s) in [points]. Unavailable in XLS
'SpaceAfter'xxPPxx xPP numberpositive number0Spacing after selected line(s) in [points]. Unavailable in XLS
'Bullet'xxPPxx xPP string'None' / 'Numbered' / 'Unnumbered' or 'Bullet''None'Bullet/numberring type (unnumbered = bullet). Unavailable in XLS
'LeftIndent'xxPPxx xPP numberpositive number0Left paragraph indent in [points]. Unavailable in XLS
'RightIndent'xxPPxx xPP numberpositive number0Right paragraph indent in [points]. Unavailable in XLS
'IndentLevel'xxPPxx xxP integerpositive integer1PPT indentation level. Default = leftmost indent = 1
'SlideHidden'xxPPxx xxP booleantrue/false/1/0/'on'/'off'falseHides or unhides the selected PPT slide
'SlideColor'xxPPxx 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
'PrintRange'xxxxPx PPP string'All' / 'Selection' / 'CurrentPage' or page range'All'DOC: page ranges are specified as strings, e.g. '2-6, 13-'
XLS, PPT: only simple page ranges are supported, e.g. '2-6'
PPT: The 'Selection' option is not supported. Instead, use a page range
'Copies'xxxxPx PPP numberany positive integer1Number of printed copies
'PrinterName'xxxxPx PPP stringany installed printer name(default Windows printer)DOC, XLS: printer name format: 'XYZ Printer on Ne01:'
PPT: printer name format: 'XYZ Printer'
'PagesPerSheet'xxxxPx xPP numberDOC: 1 / 2 / 3 / 4 / 6 / 8 / 9 / 12 / 16
PPT: 1 / 2 / 3 / 4 / 6 / 9
XLS: not supported
1Number of document pages in each printed sheet (handouts)
'Release'xxxxx+ +++ 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'xxxxxP 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