Document.VBProject, propriété (System 2007)

Mise à jour : novembre 2007

Obtient le Microsoft.Vbe.Interop.VBProject pour le document.

Espace de noms :  Microsoft.Office.Tools.Word
Assembly :  Microsoft.Office.Tools.Word.v9.0 (dans Microsoft.Office.Tools.Word.v9.0.dll)

Syntaxe

<BrowsableAttribute(False)> _
Public ReadOnly Property VBProject As VBProject

Dim instance As Document
Dim value As VBProject

value = instance.VBProject
[BrowsableAttribute(false)]
public VBProject VBProject { get; }

Valeur de propriété

Type : Microsoft.Vbe.Interop.VBProject

Microsoft.Vbe.Interop.VBProject pour le document.

Notes

Utilisez cette propriété pour gagner l'accès aux modules de code et aux formulaires d'utilisateur.

Exemples

L'exemple de code suivant utilise la propriété VBProject afin d'afficher le nom du projet Visual Basic pour Applications pour le document.

Cet exemple illustre une personnalisation au niveau du document.

Private Sub DocumentVBProject()
    MessageBox.Show("The name of the VB project is: " & Me.VBProject.Name)
End Sub 
private void DocumentVBProject()
{
    MessageBox.Show("The name of the VB project is: " +
        this.VBProject.Name);
}

Autorisations

Voir aussi

Référence

Document, classe

Membres Document

Microsoft.Office.Tools.Word, espace de noms