Dim dlg As Word.Dialog = Application.Dialogs(Word.WdWordDialog.wdDialogFileOpen)
Dim dlgType As Type = GetType(Word.Dialog)
' Set the Name property of the dialog box.
dlgType.InvokeMember("Name", _
Reflection.BindingFlags.SetProperty Or _
Reflection.BindingFlags.Public Or _
Reflection.BindingFlags.Instance, _
Nothing, dlg, New Object() {"Testing"}, _
System.Globalization.CultureInfo.InvariantCulture)
Word.Dialog dlg = Application.Dialogs[Word.WdWordDialog.wdDialogFileOpen];
System.Type dlgType = typeof(Word.Dialog);
// Set the Name property of the dialog box.
dlgType.InvokeMember("Name",
System.Reflection.BindingFlags.SetProperty |
System.Reflection.BindingFlags.Public |
System.Reflection.BindingFlags.Instance,
null, dlg, new object[] {"Testing"},
System.Globalization.CultureInfo.InvariantCulture);