Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

Visio.RequestContext class

Package:
visio

The RequestContext object facilitates requests to the Visio application. Since the Office add-in and the Visio application run in two different processes, the request context is required to get access to the Visio object model from the add-in.

Remarks

Used by

Examples

// *.run methods automatically create an OfficeExtension.ClientRequestContext
// object to work with the Office file.
Visio.run(session, function (context) {
 const activePage = context.document.getActivePage();
 // Interact with the Visio page... 

 return context.sync();
}).catch(function(error) {
 console.log("Error: " + error);
 if (error instanceof OfficeExtension.Error) {
 console.log("Debug info: " + JSON.stringify(error.debugInfo));
 }
});

Constructors

(constructor)(url)

Constructs a new instance of the RequestContext class

Properties

document

Constructor Details

(constructor)(url)

Constructs a new instance of the RequestContext class

constructor(url?: string | OfficeExtension.EmbeddedSession);

Parameters

Property Details

document

readonly document: Document;

Property Value


Feedback

Was this page helpful?