0

Possible Duplicate:
C# Simulate Key Press

I need a way in C# to "type" Ctrl+H in code when a user clicks a button. I am working on a Word addin that customizes the ribbon. When a user clicks my "Replace" button, I want the Replace dialog to show. I can't figure out how to get to that dialog box, but Ctrl+H brings it up. Is there a way to do that?

Cœur
  • 37,241
  • 25
  • 195
  • 267
Blade3
  • 4,140
  • 13
  • 41
  • 57

1 Answers1

0

Take a look here at handling different key combinations. Are you using VSTO?

EDIT: Just reread and understand you're looking at typing those keys! I'll adjust accordingly!

EDIT: The question here covers simulating key presses.

Community
  • 1
  • 1
Nick
  • 2,285
  • 2
  • 14
  • 26