|
-
October 5th, 1999, 09:15 PM
#1
How to get the HWnd of Microsoft Word?
Hello,
My VB program is controlling Microsoft Word via Automation. After starting it up (using CreateObject), I also need to know Word's Window Handle for other forms of processing.
How can I get Word's window handle?
Thanx.
MingWah
-
October 6th, 1999, 12:47 AM
#2
Re: How to get the HWnd of Microsoft Word?
You can use the FindWindow with the combination of the SetWindowPos APIs to accomplish this task.
The FindWindow will return the hWnd of the window that you are looking for and then you can use the SetWindowPos API to bring the focus of that window to the front. Check the syntax for declaration with the API text viewer.
You will have to pass the ClassName or the Window Title for the FindWindow API.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|