Company Property
TOC
Collapse the table of content
Expand the table of content

Document.Company Property (Visio)

Office 2013 and later
GitHub-Mark-64px

Contribute to this content

Use GitHub to suggest and submit changes. See our guidelines for contributing to VBA documentation.

Gets or sets the name of the company the document belongs to, one of the document's properties. Read/write.

expression .Company

expression A variable that represents a Document object.

Return Value

String

Setting the Company property is equivalent to entering information in the Company box in the Properties dialog box (click the File tab, click Info, click Properties, and then click Advanced Properties).

Security noteSecurity Note
Use this feature with caution. Sensitive or confidential information could be revealed to other users.

This Microsoft Visual Basic macro shows how to use the Company property to document the company for which the drawing is made. It adds a Document object to the Documents collection and sets the Document object's Company property as well as other properties.

Before running this macro, substitute your own values for the items in italic in the following code. To verify that these properties have been set, open the Properties dialog box.

 
Public Sub Company_Example() 
  
    Dim vsoDocument As Visio.Document  
 
    Set vsoDocument = Documents.Add("")  
 
    'Set the properties of the document.  
    vsoDocument.Title = "document title"  
    vsoDocument.Creator = "author name"  
    vsoDocument.Description = "document description"  
    vsoDocument.Keywords = "keyword1, keyword2, keyword3"  
    vsoDocument.Subject = "document subject"  
    vsoDocument.Manager = "manager name"  
    vsoDocument.Company = "company name"  
 
End Sub 

Show:
© 2016 Microsoft