How to bring up the style references dialog


This sample shows you how to bring up the Style References dialog programmatically.

How to use

  1. Copy-paste the code from this sample into a module in the Visual Basic Editor.
  2. Run the procedure. This will bring up the Style References dialog.
[VBA]
Private Sub BringUpTheStyleReferencesDialog()
    Dim pMxDoc As IMxDocument
    Dim pStyleGallery As IStyleGallery
    Set pMxDoc = ThisDocument
    Set pStyleGallery = pMxDoc.StyleGallery
    Dim pStyleDialog As IStyleDialog
    Set pStyleDialog = New StyleReferencesDialog
    pStyleDialog.DoModal pStyleGallery, Application.hWnd
End Sub