Taha Ahmad
Taha Ahmad

Reputation: 559

VSTO: MS Project - Activate the project window

I have 2 applications - a VSTO application (running as an addin inside MS Project) and a secondary application, which uses VBA to launch MS Project and call the addin.

The problem is that when I open MS Project using VBA, the MS Project window does not get focus and the user has to manually click on the window in the title bar to bring it to the foreground.

Unfortunately, I can not find a way to do this for MS Project. Help would be appreciated!

Upvotes: 2

Views: 867

Answers (1)

Rachel Hettinger
Rachel Hettinger

Reputation: 8442

If you are using VBA inside an Office application such as Excel, you can use this method:

ActivateMicrosoftApp xlMicrosoftProject

Alternatively, you can use this method:

AppActivate "Microsoft Project"

Upvotes: 1

Related Questions