Solved

Find taskID

Posted on 1998-12-11
1
177 Views
Last Modified: 2010-05-03
I am trying to use the AppActivate statement, but I need to know the TaskId of the App that I want to give focus.  How do I find the TaskID of a particular running app through code.
0
Comment
Question by:timpeters
1 Comment
 
LVL 1

Accepted Solution

by:
slobstar earned 50 total points
ID: 1449532
Here are two options:

Either type the title of the application.
AppActivate "Microsoft Word"

Or you can use the return value (taskID) of the Shell function.
MyAppID = Shell("C:\WORD\WINWORD.EXE", 1)
AppActivate MyAppID

Good luck!
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

837 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question