set focus to task pane programmatically

C

Cindy M -WordMVP-

Hi =?Utf-8?B?RGFuaWVsIEZpc2hlcm1hbg==?=,
how would you send keys in C#?
No idea. Ask in a C# group how you'd send, literally,
keystrokes to the active window in a Windows environment.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update
Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any
follow question or reply in the newsgroup and not by e-mail
:)
 
R

Ryan G

Hi Cindy,

I'm not sure if this is the right place for this question since I'm working
on VSTO (C#). Nevertheless, i'd ask.

I call SendKeys.Send("{F10}(^{Tab})") in the StartUp and NewDocument event
handlers. and it works fine when opening the first document using my
template. (no cursor in the document itself and task pane in focus).

However, when creating a new (succeeding documents) using the same template,
the cursor is force into the document instead of giving the task pane the
focus.

What could possibly be causing this?
Thanks in advance
 
Top