How to bring up the style manager


This sample shows you how to bring up the style manager 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 manager.
[VBA]
Private Sub BringUpStyleManager()
    Dim pMxDoc As IMxDocument
    Dim pStyleGallery As IStyleGallery
    Set pMxDoc = ThisDocument
    Set pStyleGallery = pMxDoc.StyleGallery
    Dim pStyleDialog As IStyleDialog
    Set pStyleDialog = New StyleManagerDialog
    pStyleDialog.DoModal pStyleGallery, Application.hWnd
End Sub