Document.VBProjectData property (Visio)
Returns the Microsoft Visual Basic project data stored with a document. Read-only.
Syntax
expression.VBProjectData
expression A variable that represents a Document object.
Return value
Byte()
Example
Use the VBProjectData property to determine whether a document has a project. The following macro shows how to get a reference to a document in Microsoft Visio to determine whether the document has a project. The code runs from a program outside the Visio document.
Private Sub Form_Load()
'Declare document variable
'and Array variable to hold project data.
Dim vsoDocument As Visio.Document
Dim btProjectData() As Byte
'Get the first object in the Documents collection
'of this instance of Visio.
Set vsoDocument = GetObject(, "Visio.Application").Documents(1)
'Populate the array with project data.
btProjectData = vsoDocument.VBProjectData
Debug.Print LBound(btProjectData); UBound(btProjectData)
End Sub
If the document had no project associated with it, "0 -1" would be reported in the Immediate window. If the document had a project, the upper bound would be some number greater than zero (0). For example, "0 1535" would indicate that a project had 1,536 bytes of data.
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기