Results 1 to 3 of 3
  1. #1
    Lounger
    Join Date
    Jan 2001
    Location
    Karlsruhe, Germany
    Posts
    48
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Displaying dialogs from VBA (Word 2002)

    Hello,

    When you open the "find" dialog the first time in a Word session the interesting stuff is hidden; you have to click a button to display the hidden options. Is there any way to write a macro that will display this dialog opened all the way always? Furthermore, is there any way to write one that will not only open "Find" all the way, but also open the dialog you get when you click "Format" and click on the "Paragraph" list entry?

    Ed Colaianni
    edc@post.harvard.edu

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Displaying dialogs from VBA (Word 2002)

    I fear that you need SendKeys for this

    SendKeys "^F%M"

    will display the Find dialog (^F = Ctrl+F) and expand it (%M = Alt+M)

    SendKeys "^F%M%OP"

    will display the Find dialog, expand it, select Format (%O = Alt+O) and select paragraph (P).

  3. #3
    5 Star Lounger
    Join Date
    May 2001
    Location
    Stuttgart, Baden-W, Germany
    Posts
    931
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Displaying dialogs from VBA (Word 2002)

    To expand on what Hans said:

    You can force Word to show the full dialog with an AutoExec macro (... this is stolen from Cindy Meister):<pre>Sub AutoExec()
    Documents.Add
    SendKeys "{TAB}{TAB}{ENTER}{ESC}"
    On Error Resume Next
    Application.Dialogs(wdDialogEditFind).Display 0
    End Sub
    </pre>

    The (sub-)dialog EditFindPara is Dialog(114):<pre>? Dialogs(114).CommandName
    </pre>

    but you've never been able to show/display it without using SendKeys, I think.

    <img src=/S/frown.gif border=0 alt=frown width=15 height=15> Klaus

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •