Reputation: 559
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
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