Type definitions (Excel, VBA)
Office
These are the type definitions (an excerpt) of the common Office library bundled with RAS. They include the file / folder selection dialog (FileDialog, from application.fileDialog(…)) and IRibbonUI / IRibbonControl, which ribbon callbacks receive. Members are written in camelCase.
Reference
Interface Office.FileDialog
A standard dialog for selecting files or folders. Get it with Application.FileDialog.
- #
show(): int
Shows the dialog. Returns -1 when the action button is clicked and 0 when canceled.
VBA:
Show- #
execute(): void
In an Open / Save As dialog, performs the action on the selected files.
VBA:
Execute- #
readonly selectedItems: FileDialogSelectedItems
The collection of paths the user selected.
VBA:
SelectedItems- #
readonly filters: FileDialogFilters
The collection of file type filters.
VBA:
Filters- #
filterIndex: int
The number of the filter selected at first (1-based).
VBA:
FilterIndex- #
title: string
The title of the dialog.
VBA:
TitleThe text shown on the action button.
VBA:
ButtonName- #
allowMultiSelect: boolean
Whether several files can be selected.
VBA:
AllowMultiSelect- #
initialFileName: string
The folder or file name shown at first.
VBA:
InitialFileName- #
initialView: MsoFileDialogView
The initial view of the file list.
VBA:
InitialView- #
readonly dialogType: MsoFileDialogType
The kind of dialog.
VBA:
DialogType- #
readonly item: string
VBA:
Item- #
readonly application: object
VBA:
Application- #
readonly parent: object
VBA:
Parent
Interface Office.FileDialogSelectedItems
The collection of paths selected in a FileDialog.
- #
(index: int): string
Returns a selected path by index (1-based) (default member).
- #
item(index: int): string
Returns a selected path by index (1-based).
VBA:
Item- #
readonly count: int
The number of selected paths.
VBA:
Count- #
readonly application: object
VBA:
Application- #
readonly parent: object
VBA:
Parent
Interface Office.FileDialogFilters
The collection of file type filters of a FileDialog.
- #
(index: int): FileDialogFilter
Returns a filter by index (1-based) (default member).
- #
item(index: int): FileDialogFilter
Returns a filter by index (1-based).
VBA:
Item- #
readonly count: int
The number of filters.
VBA:
Count- #
add(description: string, extensions: string, position?: any): FileDialogFilter
Adds a filter. Give the extensions in the form "*.xlsx; *.xlsm".
VBA:
Add- #
clear(): void
Deletes every filter.
VBA:
Clear- #
delete(filter?: any): void
Deletes one filter.
VBA:
Delete- #
readonly application: object
VBA:
Application- #
readonly parent: object
VBA:
Parent
Interface Office.FileDialogFilter
One file type filter of a FileDialog.
Interface Office.IRibbonUI
The ribbon UI. Received in the onLoad callback of the ribbon XML and used to refresh the display.
- #
invalidate(): void
Makes every callback of the custom ribbon be evaluated again.
VBA:
Invalidate- #
invalidateControl(controlId: string): void
Makes only the control with the given ID be evaluated again.
VBA:
InvalidateControl- #
invalidateControlMso(controlId: string): void
Makes the built-in control with the given ID be evaluated again.
VBA:
InvalidateControlMso- #
activateTab(controlId: string): void
Activates the custom tab with the given ID.
VBA:
ActivateTab- #
activateTabMso(controlId: string): void
Activates the built-in tab with the given ID.
VBA:
ActivateTabMso- #
activateTabQ(controlId: string, namespace: string): void
Activates the custom tab given by a namespace-qualified ID.
VBA:
ActivateTabQ
Interface Office.IRibbonControl
The control that was operated, passed to ribbon callbacks.
Enum Office.MsoFileDialogType
Specifies the kind of FileDialog.
Enum Office.MsoFileDialogView
Specifies the view of a FileDialog's file list.
Enum Office.MsoTriState
A three-state value that can express "mixed" and so on besides true / false.
Enum Office.MsoAutomationSecurity
Specifies the macro security used when opening files from a program.
Enum Office.MsoFillType
The kind of fill of a shape.
Enum Office.MsoShapeType
The kind of shape.
- #
mso3DModel = 30
- #
msoAutoShape = 1
- #
msoCallout = 2
- #
msoCanvas = 20
- #
msoChart = 3
- #
msoComment = 4
- #
msoContentApp = 27
- #
msoDiagram = 21
- #
msoEmbeddedOLEObject = 7
- #
msoFormControl = 8
- #
msoFreeform = 5
- #
msoGraphic = 28
- #
msoGroup = 6
- #
msoIgxGraphic = 24
- #
msoInk = 22
- #
msoInkComment = 23
- #
msoLine = 9
- #
msoLinked3DModel = 31
- #
msoLinkedGraphic = 29
- #
msoLinkedOLEObject = 10
- #
msoLinkedPicture = 11
- #
msoMedia = 16
- #
msoOLEControlObject = 12
- #
msoPicture = 13
- #
msoPlaceholder = 14
- #
msoScriptAnchor = 18
- #
msoShapeTypeMixed = -2
- #
msoSlicer = 25
- #
msoTable = 19
- #
msoTextBox = 17
- #
msoTextEffect = 15
- #
msoWebVideo = 26
Enum Office.MsoAutoShapeType
Specifies the shape of an AutoShape (common ones only).
- #
msoShapeRectangle = 1
- #
msoShapeRoundedRectangle = 5
- #
msoShapeOval = 9
- #
msoShapeDiamond = 4
- #
msoShapeIsoscelesTriangle = 7
- #
msoShapeRightTriangle = 8
- #
msoShapeParallelogram = 2
- #
msoShapeTrapezoid = 3
- #
msoShapeHexagon = 10
- #
msoShapeOctagon = 6
- #
msoShapeCross = 11
- #
msoShapeRegularPentagon = 12
- #
msoShapeRightArrow = 33
- #
msoShapeLeftArrow = 34
- #
msoShapeUpArrow = 35
- #
msoShapeDownArrow = 36
- #
msoShapeLeftRightArrow = 37
- #
msoShapeUpDownArrow = 38
- #
msoShape5pointStar = 92
- #
msoShapeHeart = 21
- #
msoShapeCloud = 179
- #
msoShapeDonut = 18
- #
msoShapeCube = 14
- #
msoShapeCan = 13
- #
msoShapeRectangularCallout = 105
- #
msoShapeRoundedRectangularCallout = 106
- #
msoShapeOvalCallout = 107
- #
msoShapeCloudCallout = 108
- #
msoShapeFlowchartProcess = 61
- #
msoShapeFlowchartDecision = 63
- #
msoShapeFlowchartTerminator = 69
- #
msoShapeFlowchartData = 64
- #
msoShapeFlowchartConnector = 73
- #
msoShapeMixed = -2
Enum Office.MsoTextOrientation
Specifies the orientation of text in a shape.
Enum Office.MsoZOrderCmd
Specifies how to move a shape in the z-order.