How to give focus to Notes Client from vbScript

pts.
Tags:
Development
I am developing an intranet application, which has to occasionally work with Notes clients, which are installed on all the client machines. I am using vbScript to create a NotesUIWorkspace and open a document on the client. So far so good, only thing is, if the Notes client is already running, it will open the document, but the window doesn't become active (ie it stays behind the browser window). Obviously this is no good, I need Notes to pop up from the background. I've been going over the notes interface for hours, but I can't find anything that'll do the trick. Any ideas?

Answer Wiki

Thanks. We'll let you know when a new response is added.

there is no Notes functionality to do the trick. You have to use a Windows API function to get a handle to the Notes window and bring it to the front. Here is the function to get a handle to the window:

Declare Function FindWindow Lib “user32″ Alias “FindWindowA” (Byval
lpClassName&, Byval lpWindowName$) As Long

Just search the web to get examples for activating a background window with script and API calls.

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following