---
title: ActiveX Document
slug: activex-document
qid: Q4677481
snapshot: activex-document-534767-17fc79404f45bf7a
content_hash: 17fc79404f45bf7a4ddc472a679bae50f57bc4b40887c7e8d194e42867f1e389
license: CC BY-SA 4.0
source: https://en.wikipedia.org/w/index.php?oldid=1247816379
tags: [23005069, 23118434, 23603337, 37160764, 43348721, 80682455]
---

# ActiveX Document

> [!note] Provenance
> Snapshot `activex-document-534767-17fc79404f45bf7a` · content root `17fc79404f45bf7a…`
> Derived from <https://en.wikipedia.org/w/index.php?oldid=1247816379> · Licensed CC BY-SA 4.0

ActiveX Document (also known as DocObject or DocObj ) is a Microsoft technology that allows users to view and edit Microsoft Word, Excel, and PDF documents inside web browsers. It defines a set of Component Object Model coding contracts between hosting programs like Internet Explorer or Microsoft Office Binder and hosted documents from programs like Microsoft Word, Microsoft Excel and Adobe Reader. This allows them to negotiate communications about commands like save and navigate, as well as merging user interface elements such as menu, to provide a unified user experience. Initially designed for compound documents based on COM Structured Storage, the technology allows one single hosting program like Office Binder to contain unlimited type of documents. The server program that provides an ActiveX document can be an EXE or a DLL server.

ActiveX Document (also known as DocObject or DocObj ) is a Microsoft technology that allows users to view and edit Microsoft Word, Excel, and PDF documents inside web browsers. It defines a set of Component Object Model coding contracts between hosting programs like Internet Explorer or Microsoft Office Binder and hosted documents from programs like Microsoft Word, Microsoft Excel and Adobe Reader. This allows them to negotiate communications about commands like save and navigate, as well as merging user interface elements such as menu, to provide a unified user experience. Initially designed for compound documents based on COM Structured Storage, the technology allows one single hosting program like Office Binder to contain unlimited type of documents. The server program that provides an ActiveX document can be an EXE or a DLL server. ==Code contracts== There are a few code contracts that ActiveX documents and their container need to implement in order to communicate about their capabilities and requirements. An ActiveX document server application needs to implement the following code contracts that are expected by an ActiveX document container that is going to host the document: IPersistStorage, if use compound files as the storage Standard OLE interfaces like IPersistFile, IOleObject, and IDataObject, for creating a document that supports object linking and embedding from file IOleInPlaceObject and IOleInPlaceActiveObject, for editing inline IOleDocument, IOleCommandTarget, and IPrint, for talking to document container, command routing, and printing An ActiveX document container application needs to implement the following code contracts Provide storage for documents via IStorage Implement IOleClientSite and IAdviseSink, for standard object linking and embedding Implement IOleInPlaceSite and IOleInPlaceFrame, for editing inline Implement IOleDocumentSite, IOleCommandTarget, IPrint and IContinueCallback, for document hosting, command routing and printing ==Developer Support== Microsoft has ActiveX Document support in its developer tools to help programmers in creating ActiveX Document applications. In Visual C++, programmers can include Microsoft Foundation Classes's support for ActiveX Documents in the MFC project wizard. A programmer can choose to add ActiveX document server and/or container support to the new program by checking a checkbox during the project creation process. In Visual Basic, ActiveX Document Migration wizard helps programmers to convert VB forms into ActiveX documents. In Visual FoxPro, The ActiveDoc Base Class supports development for ActiveX document servers. ==References==
