Skip to content

Latest commit

 

History

History
46 lines (26 loc) · 1.29 KB

Word.Document.Container.md

File metadata and controls

46 lines (26 loc) · 1.29 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
Document.Container property (Word)
vbawd10.chm158007378
vbawd10.chm158007378
Word.Document.Container
f2a0ebbe-98dc-dfc4-5879-da2b79e75b7d
06/08/2017
medium

Document.Container property (Word)

Returns the object that represents the container application for the specified document. Read-only Object.

Syntax

expression. Container

expression A variable that represents a Document object.

Remarks

The Container property provides access to the specified document's container application if the document is embedded in another application as an OLE object. This property also provides a pathway into the object model of the container application if a Word document is opened as an ActiveX document — for example, when a Word document is opened in Microsoft Office Binder or Internet Explorer.

Example

This example displays the name of the container application for the first shape in the active document. For the example to work, this shape must be an OLE object.

Msgbox ActiveDocument.Shapes(1).OLEFormat.Object.Container.Name

See also

Document Object

[!includeSupport and feedback]