Consulting

Results 1 to 4 of 4

Thread: Solved: document_open or auto_open

  1. #1

    Solved: document_open or auto_open

    I have a Word document. When the document is opened then I would like the "Find" dialog to be automatically opened, as in the screen-shot below.



    I've tried the following, but all I get is a beep.

    [VBA]Private Sub Document_Open()
    ' Autoexec Macro
    Selection.Find.ClearFormatting
    With Selection.Find
    .Text = ""
    End With
    'Selection.Find.Execute
    Beep
    End Sub[/VBA]

    Please advise and thanks in advance,
    Andrew

  2. #2
    Site Admin
    Jedi Master
    VBAX Guru Jacob Hilderbrand's Avatar
    Joined
    Jun 2004
    Location
    Roseville, CA
    Posts
    3,712
    Location
    Try this.
    [vba]
    Option Explicit

    Private Sub Document_Open()

    Application.Dialogs(wdDialogEditFind).Show

    End Sub
    [/vba]

  3. #3

    Talking

    Whoa!

    Thank you!

    This is great!

  4. #4
    Site Admin
    Jedi Master
    VBAX Guru Jacob Hilderbrand's Avatar
    Joined
    Jun 2004
    Location
    Roseville, CA
    Posts
    3,712
    Location
    You're Welcome

    Take Care

Posting Permissions

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