Types: VBA and macros
Compute Contract type definitions — the project, running, trust, and the list of approved macros. Names: 36.
Definitions of the names from the “TypeScript type” column on the operation pages.
Other dictionary topics: session, workbook, and sheets · cells and ranges · formulas and calculation · formatting · data and sheet objects · pivot tables · charts and graphics · printing and page layout · Power Query · VBA and macros · protection and review · general and utility.
Types on this page — 36
ContractMacroTrustIntentContractMacroTrustInventoryCountsContractMacroTrustProvenanceContractMacroTrustResultContractMacroTrustStateContractTrustCenterMacroPolicyVbaBlockerSourceSpanVbaCapabilityBlockerVbaCapabilityBlockerKindVbaEntrypointDescriptorVbaExecutionOutcomeVbaExecutionOutcomeKindVbaExecutionPlanVbaExecutionRouteVbaExecutionSessionIdVbaMacroKindVbaMacroVisibilityVbaModuleCapabilityVbaModuleKindVbaMutationPreviewVbaMutationPreviewCellVbaProjectBlockerTallyVbaProjectCapabilitySummaryVbaProjectInspectionVbaProjectReferenceVbaScheduledMacroVbaStructuralChangeVbaStructuralChangeOperationVbaStructuralPreviewVbaSuppliedAnswerVbaSystemFactsVbaUserFormVbaUserFormActionVbaUserFormFieldVbaUserFormFieldKindVbaUserFormUnsupportedControl
ContractMacroTrustIntent
Section titled “ContractMacroTrustIntent”type ContractMacroTrustIntent = | { action: "inspect" } | { action: "inspect_signatures" } | { action: "keep_macros" } | { action: "remove_macros_from_copy"; destinationUri: string } | { action: "save_signature_copy"; destinationUri: string } | { action: "remove_signatures" } | { action: "cancel" };ContractMacroTrustInventoryCounts
Section titled “ContractMacroTrustInventoryCounts”interface ContractMacroTrustInventoryCounts { packageParts: number; vbaProjects: number; vbaRelationships: number; signatureParts: number; customUiParts: number; activeXParts: number; oleParts: number; formControlParts?: number; externalLinkParts?: number; externalRelationships?: number;}ContractMacroTrustProvenance
Section titled “ContractMacroTrustProvenance”type ContractMacroTrustProvenance = "package-inventory" | "protected-view-policy" | "trusted-location-policy";ContractMacroTrustResult
Section titled “ContractMacroTrustResult”interface ContractMacroTrustResult { states: ContractMacroTrustState[]; counts: ContractMacroTrustInventoryCounts;
cryptographicSignatureValidated: false;
vbaRuntimeAvailable: false; packageFormat?: ContractFileFormat; trustProvenance?: ContractMacroTrustProvenance[]; opaquePreservationVerified?: boolean; sourceBytesUnchanged: boolean; copied: boolean; outputByteCount: number; removedPartCount: number; removedRelationshipCount: number; macroFreeRemainderCount?: number; sourceMutated?: boolean; signatureInventory?: OpcSignatureInventory; reasonCode?: string;}ContractMacroTrustState
Section titled “ContractMacroTrustState”type ContractMacroTrustState = | "macro-present" | "signature-part-present" | "unsigned" | "modified-after-signature-risk" | "malformed" | "blocked-by-protected-view" | "blocked-by-trusted-location" | "unsupported";ContractTrustCenterMacroPolicy
Section titled “ContractTrustCenterMacroPolicy”type ContractTrustCenterMacroPolicy = "block_with_notification" | "block_without_notification";VbaBlockerSourceSpan
Section titled “VbaBlockerSourceSpan”interface VbaBlockerSourceSpan {
line: number;
column: number;
length: number;
offset: number;}VbaCapabilityBlocker
Section titled “VbaCapabilityBlocker”interface VbaCapabilityBlocker { kind: VbaCapabilityBlockerKind;
detail: string;
evidence: string;
sourceSpan: VbaBlockerSourceSpan | null;
module: string;
procedure: string | null;}VbaCapabilityBlockerKind
Section titled “VbaCapabilityBlockerKind”type VbaCapabilityBlockerKind = | "external-automation" | "event-or-document-module" | "language-pending" | "host-member-pending" | "unparsed" | "run-declaration-pending" | "excel-compile-error";VbaEntrypointDescriptor
Section titled “VbaEntrypointDescriptor”interface VbaEntrypointDescriptor {
entrypoint: string; module: string; procedure: string; kind: VbaMacroKind; visibility: VbaMacroVisibility; userRunnable: boolean; route: VbaExecutionRoute;
nativeClaim: boolean;
nativeLowerable: number; blockers: VbaCapabilityBlocker[];}VbaExecutionOutcome
Section titled “VbaExecutionOutcome”interface VbaExecutionOutcome { kind: VbaExecutionOutcomeKind;
stop: string | null;
detail: string;
rolledBack: boolean;
progress?: { phase: "pending" | "running" | "finished"; steps: number; instructionBudget: number; cancellationRequested: boolean; };}VbaExecutionOutcomeKind
Section titled “VbaExecutionOutcomeKind”type VbaExecutionOutcomeKind = | "running" | "completed" | "refused-by-capability" | "unknown-entrypoint" | "unresolved-code-module" | "runtime-error" | "runtime-stopped";VbaExecutionPlan
Section titled “VbaExecutionPlan”interface VbaExecutionPlan {
planId: string;
planHash: string; entrypoint: string;
route: VbaExecutionRoute | null;
mayRunNatively: boolean; blockers: VbaCapabilityBlocker[];
instructionBudget: number;
steps: null;}VbaExecutionRoute
Section titled “VbaExecutionRoute”type VbaExecutionRoute = "native" | "excel-bridge" | "excel-bridge-legacy" | "preserve-only";VbaExecutionSessionId
Section titled “VbaExecutionSessionId”type VbaExecutionSessionId = string;VbaMacroKind
Section titled “VbaMacroKind”type VbaMacroKind = "sub" | "function" | "property-get" | "property-let" | "property-set";VbaMacroVisibility
Section titled “VbaMacroVisibility”type VbaMacroVisibility = "public" | "private" | "friend";VbaModuleCapability
Section titled “VbaModuleCapability”interface VbaModuleCapability { name: string; kind: VbaModuleKind;
supportedLines: number; unsupportedLines: number; syntaxErrorLines: number; entrypointCount: number;}VbaModuleKind
Section titled “VbaModuleKind”type VbaModuleKind = "standard" | "document" | "class" | "form" | "unknown";VbaMutationPreview
Section titled “VbaMutationPreview”interface VbaMutationPreview { cells: VbaMutationPreviewCell[];
structural: VbaStructuralPreview;
structureTouched: boolean;
sessionStateTouched: boolean;}VbaMutationPreviewCell
Section titled “VbaMutationPreviewCell”interface VbaMutationPreviewCell { sheet: string; row: number; col: number;
beforeDisplayText: string | null;
afterDisplayText: string | null;
beforeFormula: string | null; afterFormula: string | null;}VbaProjectBlockerTally
Section titled “VbaProjectBlockerTally”interface VbaProjectBlockerTally { kind: VbaCapabilityBlockerKind; macros: number;}VbaProjectCapabilitySummary
Section titled “VbaProjectCapabilitySummary”interface VbaProjectCapabilitySummary { modules: number; macros: number; nativeCandidates: number; excelBridge: number; excelBridgeLegacy: number; preserveOnly: number; userRunnable: number; userRunnableNative: number; nativeCandidateRatio: number; topBlockers: VbaProjectBlockerTally[];}VbaProjectInspection
Section titled “VbaProjectInspection”interface VbaProjectInspection {
capabilityContractVersion: number; sourceLabel: string; projectName: string | null;
codePage: number; modules: VbaModuleCapability[]; references: VbaProjectReference[]; entrypoints: VbaEntrypointDescriptor[]; userForms: VbaUserForm[]; summary: VbaProjectCapabilitySummary;}VbaProjectReference
Section titled “VbaProjectReference”interface VbaProjectReference { key: string; value: string;}VbaScheduledMacro
Section titled “VbaScheduledMacro”interface VbaScheduledMacro { earliestTimeSerial: number; procedure: string; latestTimeSerial?: number; schedule: boolean;}VbaStructuralChange
Section titled “VbaStructuralChange”interface VbaStructuralChange { operation: VbaStructuralChangeOperation;
sheet: string | null;
description: string;}VbaStructuralChangeOperation
Section titled “VbaStructuralChangeOperation”type VbaStructuralChangeOperation = | "sheet-added" | "sheet-renamed" | "sheet-deleted" | "cells-inserted" | "cells-deleted" | "name-defined" | "save-as-staged";VbaStructuralPreview
Section titled “VbaStructuralPreview”type VbaStructuralPreview = | { state: "none" } | { state: "listed"; changes: VbaStructuralChange[] } | { state: "incomplete"; named: VbaStructuralChange[] };VbaSuppliedAnswer
Section titled “VbaSuppliedAnswer”interface VbaSuppliedAnswer {
kind: string;
prompt?: string;
value: string;}VbaSystemFacts
Section titled “VbaSystemFacts”interface VbaSystemFacts { operatingSystem: string; userLibraryPath: string;}VbaUserForm
Section titled “VbaUserForm”interface VbaUserForm { name: string; title: string; fields: VbaUserFormField[]; actions: VbaUserFormAction[]; unsupportedControls: VbaUserFormUnsupportedControl[];
importError: string | null;}VbaUserFormAction
Section titled “VbaUserFormAction”interface VbaUserFormAction { id: string; label: string; kind: "submit" | "cancel" | "custom"; requiresConfirmation: boolean;}VbaUserFormField
Section titled “VbaUserFormField”interface VbaUserFormField { id: string; label: string; kind: VbaUserFormFieldKind; required: boolean; choices: string[]; default: string | null;
group: string | null;}VbaUserFormFieldKind
Section titled “VbaUserFormFieldKind”type VbaUserFormFieldKind = | "text" | "number" | "date" | "boolean" | "choice" | "multi_choice" | "range_picker" | "file_picker";VbaUserFormUnsupportedControl
Section titled “VbaUserFormUnsupportedControl”interface VbaUserFormUnsupportedControl { name: string; controlType: string;}