Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / April 2006

Tip: Looking for answers? Try searching our database.

How to find names for built-in dialog boxes

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Michael Eyestone - 10 Apr 2006 17:54 GMT
Is the list that comes up in the VB Editor as you type

Dialogs(

the full list available?  In particular, I'm trying to find out how to call
the "Modify Style" dialog.

Thanks in advance,
Michael Eyestone
Ottawa, Canada
Helmut Weber - 10 Apr 2006 18:28 GMT
Hi Michael,

not really a help, what I have to offer.

It seems that the list is complete.
Which doesn't help you, as there is a dialog
wdDialogEditStyle,
which may be what you want,
but doesn't do anything at all:

Dim oDlg As Dialog
Set oDlg = Dialogs(wdDialogEditStyle)
oDlg.Display

Results in nothing! :-(

If you are just interested in font then:
Dialogs(wdDialogFormatDefineStyleFont)

If you are just interested in the paragraph's layout, then:
Dialogs(wdDialogFormatDefineStylePara)

plus some more.

Signature

Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"

Michael Eyestone - 10 Apr 2006 19:50 GMT
Helmut:

Thanks for the input.  I had found that (non-functioning) one, and thought
perhaps I was using it incorrectly.  Upshot is that I am evidently unable to
cause Word to show me the Modify Styles dialog box using a macro.  Sad!

Cheers,
Michael

> Hi Michael,
>
[quoted text clipped - 19 lines]
>
> plus some more.
Jay Freedman - 10 Apr 2006 20:58 GMT
Since the Modify Style dialog needs to know which style to work on, it's a
child of the FormatStyles dialog. It's clunky (and might sometimes
malfunction), but you can use the SendKeys command to simulate pressing
Alt+M in the FormatStyles dialog this way:

  Dim StyleToEdit As String
  Dim dlg As Dialog

  StyleToEdit = "Footer"  ' just an example...
  Set dlg = Dialogs(wdDialogFormatStyle)

  With dlg
     .Name = StyleToEdit
     SendKeys "%m": .Show
  End With

  Set dlg = Nothing

Signature

Regards,
Jay Freedman
Microsoft Word MVP          FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

> Helmut:
>
[quoted text clipped - 37 lines]
>> Win XP, Office 2003
>> "red.sys" & Chr$(64) & "t-online.de"
Tony Jollans - 11 Apr 2006 12:11 GMT
There are some dialogs for which there are no defined constants. I don't
know of any list (bar my own somewhat incomplete one) but ..

   Dialogs(1347).Show

... will present the Modify Style dialog for the Style at the insertion
point.

--
Enjoy,
Tony

> Helmut:
>
[quoted text clipped - 36 lines]
> > Win XP, Office 2003
> > "red.sys" & Chr$(64) & "t-online.de"
Michael Eyestone - 12 Apr 2006 14:55 GMT
Hey, that's terrific, thanks very much!  Why are things like this so hard?  
Why wouldn't the help file include such a list?  I mean, really.

But thanks again!

Michael

> There are some dialogs for which there are no defined constants. I don't
> know of any list (bar my own somewhat incomplete one) but ..
[quoted text clipped - 49 lines]
> > > Win XP, Office 2003
> > > "red.sys" & Chr$(64) & "t-online.de"
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.