Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Activating other open applications.

Status
Not open for further replies.

Rationalist

Programmer
May 31, 2005
21
CA
Hi there,

Is there a way to activate another application that is running? I'm looking for a sample code.

Thanks
 
You could try using AppActivate although this isn't a true framework method.


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
I am having a similar problem. I have written an HTML page that uses buttons and VBScript to perform functions and link users to other applications and pages. This HTML only runs locally on the network so no server is involved, just the internal network.

Most users also have Outlook up at the same time as running this HTML page. One button causes Outlook to change to a different public folder. Then it activates Outlook to display the new folder location.

My problem is that the Outlook relocation goes just fine. But the AppActivate function is totally erratic. Sometimes it causes Outlook to become the active display window and sometimes it does not. Half the time Outlook just stays minimized on the task bar.

Any ideas how to verify and ensure that another application is activated and made foremeost?

Here is the code:

Function CheckOutlook(myFolder)
Dim myOlApp, myForm, WsShell
Set myOlApp = GetObject("","Outlook.Application")
Set myNameSpace = myOlApp.GetNamespace("MAPI")
Set myOLApp.ActiveExplorer.CurrentFolder = myNameSpace.Folders("Public Folders").Folders("All Public Folders").Folders("Principal Financial Group").Folders("Information Services").Folders("IS Data Center").Folders("Physical Planning").Folders("Corp 7 Approved Access")
Set WsShell = CreateObject("WScript.Shell")
WsShell.AppActivate ("Corp 7 Approved Access")
Set WsShell = Nothing
Set MyOLApp = Nothing
Set myNameSpace = Nothing
End Function
 
Try asking in the VBScript forum


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top