Share via

Display expanded replace dialog box and stop

Charles Kenyon 167.7K Reputation points Volunteer Moderator
2012-01-26T21:01:13+00:00

I am doing some routine replaces that need to be examined rather than have replace all run. I would like my macro to set the find and replace variables and "Find Next" with the dialog box displayed, then stop to let the user handle it.

I'm using:

application.Dialogs(wdDialogEditReplace).Show

That doesn't seem to display the expanded box. Is there a command that displays the box as if the More button had been pressed?

Microsoft 365 and Office | Word | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

HansV 462.6K Reputation points
2012-01-26T21:40:01+00:00

Try

With Application.Dialogs(wdDialogEditReplace)

    SendKeys "%m"

    .Find = "this"

    .Replace = "that"

    .Show

End With

Was this answer helpful?

0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Anonymous
    2012-01-26T21:39:56+00:00

    Was this answer helpful?

    0 comments No comments