OfficeExtension


ClientObject

An abstract object representing the active Office document

context the request context associated with the object.
isNullObject you must call context.sync before checking this property.

ClientRequestContext

An abstract object that facilitates requests to the host Office application.
The Excel.run method provides a request context.

debugInfoP 
requestHeadersP 
trackedObjectsP 
loadM 
loadRecursiveM 
syncM 
traceM 

ClientResult

Contains the result for methods that return primitive types.
The objects value property is retrieved from the document after context.sync is involved.

valueP 

DebugInfo

Provides useful information about an error.

codeP(string)
errorLocationP(string)
fullStatementsP(string[])
innerErrorP 
messageP(string)
statementsP(string)
surroundingStatementsP(string)

EmbeddedOptions

An interface with these properties

containerP(HTMLElement)
heightP(string)
idP(string)
sessionKeyP(string)
timeoutInMillisecondsP(string)
widthP(string)

EmbeddedSession

An abstract class

initM(HTMLElement)

Error

The error object that is returned by "context.sync()" when a promise is rejected while processing the request.

codeP(string) short name of the error
debugInfoP(OfficeExtension.DebugInfo) more useful information
innerErrorP(Error) inner message, if applicable
messageP(string) description of the error
nameP(string) always OfficeExtension.Error
stackP(string) stack trace, if applicable
traceMessageP(string[]) trace messages added via context.trace()

ErrorCodes

An abstract class

accessDeniedP(string)
activityLimitReachedP(string)
apiNotFoundP(string)
cannotRegisterEventP(string)
connectionFailureP(string)
generalExceptionP(string)
invalidArgumentP(string)
invalidObjectPathP(string)
invalidRequestContextP(string)
propertyNotLoadedP(string)
runMustReturnPromiseP(string)
valueNotLoadedP(string)

EventHandlerResult

??

contextP 
removeM 

EventHandlers

??

addM 
removeM 

EventInfo

An interface with these properties

eventArgsTransformFuncP 
registerFuncP 
unregisterFuncP 

LoadOption

Specifies which properties of an object should be loaded.
This load happens when the sync method is executed.


context.load(paragraphs, 'text,font/size');  
paragraphs.load('text,font/size');
paragraphs.load( { select: 'text,font/size' , expand:'font' , top:50 , skip:50 });

expandP
selectP
skipP
topP

Promise

Available in ExcelApi 1.2 or WordApi 1.2 or higher.. The examples below will use OfficeExtension.Promise, as it's the easiest way to get started.
You can use OfficeExtension.Promise in place of the global Promise object. because Office.js includes its own Promise poly-filla.
(page 74)


RequestContextDebugInfo

Contains debug information about the request context

pendingStatementsP 

RequestUrlAndHeaderInfo

An interface to specify the request URL and headers.

headersP 
urlP 

RunOptions

Additional options that can be passed to the HOST.run() method.

previousObjectsP 
sessionP 

TrackedObjects

Collection of tracked objects contained within a request.

addM 
removeM 

UpdateOptions

Provides an option for supressing an error when the object that is used to set multiple properties tries to set read-only properties.

throwOnReadOnlyP 


© 2022 Better Solutions Limited. All Rights Reserved. © 2022 Better Solutions Limited TopPrevNext