VB controlling Powerpoint
Posted on 1997-10-20
I wis to use VB4 to control (ie start up with ppt file1, kill after 30 mins., start up with file2, kill etc) Office97 Power Point Viewer.
OLE seems slow.
I am using SHELL to start POWERPOINT VIEWER, then AppActivate to give it the focus and (after lapsed time) I use Sendkey to send ESCAPE to terminate Powerpoint.
This works fine 95% of time.
The other 5% of the time it appears that Powerpoint does not receive the ESCAPE and hence keeps running...I soon have multiple copies running.
Question, a) I would like to test that Powerpoint has correctly started, and correctly terminated (ie I need a way of checking Handle of Powerpoint.) I have followed advice in book ie API GetHandle etc ...this does not seem to work
b) How do I find out correct filename to place on right hand side of API call. Whatever I try it always seems to return a value of zero, implying that the application is not running.