Class Dialogs (Word VBA)

A collection of Dialog objects in Word. Each Dialog object represents a built-in Word dialog box. To use a Dialogs class variable it first needs to be instantiated, for example


Dim dlgs as Dialogs
Set dlgs = Dialogs

For Each

Here is an example of processing the Dialogs items in a collection.


Dim dlg As Dialog
For Each dlg In Dialogs
	
Next dlg

Count

Returns a Long that represents the number of dialog boxes in the collection.


Dim lngCount As Long
lngCount = Dialogs.Count

Item

Returns a dialog in Microsoft Word.

Item (Index)

Index: A constant that specifies the dialog.


Sub DialogItem() 
 Application.Dialogs.Item(wdDialogFileDocumentLayout).Display 
End Sub