Google
 
Webnews.only-4-geeks.com
Interesting places
news.only-4-geeks.com Forum Index » PowerPoint

end process if application closed

 
Jump to:  
 
theintern
PostPosted: Fri Aug 29, 2008 11:47 am    Post subject: end process if application closed
       
I have a macro running each time a certain presentation is opened. however,
if i close the presentation, and open again, it says it cannot be opened
because there is a dialogue box open, i.e. my macro is still running. i can
force it to stop by opening the Process tab in the Task Manager, then End
Process of POWERPNT.EXT. is there any logic i can put in the macro to end
the process if the application is closed?

thanks
scott
 

 
Bill Dilworth
PostPosted: Fri Aug 29, 2008 1:17 pm    Post subject: Re: end process if application closed
       
Are you using event trapping?


--
Bill Dilworth
A proud member of the Microsoft PPT MVP Team
Users helping fellow users.
LINK
-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
vestprog2@ Please read the PowerPoint FAQ pages.
yahoo. They answer most of our questions.
com LINK
..
"theintern" <theintern@discussions.microsoft.com> wrote in message
news:1D01076B-D59B-4279-B22F-2C8D1F55809E@microsoft.com...
Quote:
I have a macro running each time a certain presentation is opened.
however,
if i close the presentation, and open again, it says it cannot be opened
because there is a dialogue box open, i.e. my macro is still running. i
can
force it to stop by opening the Process tab in the Task Manager, then End
Process of POWERPNT.EXT. is there any logic i can put in the macro to end
the process if the application is closed?

thanks
scott
 

 
theintern
PostPosted: Fri Aug 29, 2008 1:24 pm    Post subject: Re: end process if application closed
       
To run the macro at the beginning yes, but once the macro is running there is
no event trapping. I just have it insert some photos and start the
presentation, then wait 5 minutes, delete all photos and close. problem is
that i want it to kill the process completely if during those 5 minutes the
user closes PP.

"Bill Dilworth" wrote:

Quote:
Are you using event trapping?


--
Bill Dilworth
A proud member of the Microsoft PPT MVP Team
Users helping fellow users.
LINK
-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
vestprog2@ Please read the PowerPoint FAQ pages.
yahoo. They answer most of our questions.
com LINK
..
"theintern" <theintern@discussions.microsoft.com> wrote in message
news:1D01076B-D59B-4279-B22F-2C8D1F55809E@microsoft.com...
I have a macro running each time a certain presentation is opened.
however,
if i close the presentation, and open again, it says it cannot be opened
because there is a dialogue box open, i.e. my macro is still running. i
can
force it to stop by opening the Process tab in the Task Manager, then End
Process of POWERPNT.EXT. is there any logic i can put in the macro to end
the process if the application is closed?

thanks
scott


 

 
Steve Rindsberg
PostPosted: Fri Aug 29, 2008 5:32 pm    Post subject: Re: end process if application closed
       
In article <D88C40FB-AEB7-4564-9F27-03EC40B45626@microsoft.com>, Theintern
wrote:
Quote:
To run the macro at the beginning yes, but once the macro is running there is
no event trapping. I just have it insert some photos and start the
presentation, then wait 5 minutes, delete all photos and close. problem is
that i want it to kill the process completely if during those 5 minutes the
user closes PP.

How are you forcing it to wait 5 minutes?



Quote:

"Bill Dilworth" wrote:

Are you using event trapping?


--
Bill Dilworth
A proud member of the Microsoft PPT MVP Team
Users helping fellow users.
LINK
-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
vestprog2@ Please read the PowerPoint FAQ pages.
yahoo. They answer most of our questions.
com LINK
..
"theintern" <theintern@discussions.microsoft.com> wrote in message
news:1D01076B-D59B-4279-B22F-2C8D1F55809E@microsoft.com...
I have a macro running each time a certain presentation is opened.
however,
if i close the presentation, and open again, it says it cannot be opened
because there is a dialogue box open, i.e. my macro is still running. i
can
force it to stop by opening the Process tab in the Task Manager, then End
Process of POWERPNT.EXT. is there any logic i can put in the macro to end
the process if the application is closed?

thanks
scott





-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ: LINK
PPTools: LINK
================================================
Live and in personable in the Help Center at PowerPoint Live
Sept 21-24, San Diego CA, USA
LINK
 

 
theintern
PostPosted: Wed Sep 03, 2008 11:05 am    Post subject: Re: end process if application closed
       
Sub Wait2()
waitTime2 = 305
start2 = Timer
While Timer < start2 + waitTime2
DoEvents
Wend
End Sub

"Steve Rindsberg" wrote:

Quote:
In article <D88C40FB-AEB7-4564-9F27-03EC40B45626@microsoft.com>, Theintern
wrote:
To run the macro at the beginning yes, but once the macro is running there is
no event trapping. I just have it insert some photos and start the
presentation, then wait 5 minutes, delete all photos and close. problem is
that i want it to kill the process completely if during those 5 minutes the
user closes PP.

How are you forcing it to wait 5 minutes?




"Bill Dilworth" wrote:

Are you using event trapping?


--
Bill Dilworth
A proud member of the Microsoft PPT MVP Team
Users helping fellow users.
LINK
-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
vestprog2@ Please read the PowerPoint FAQ pages.
yahoo. They answer most of our questions.
com LINK
..
"theintern" <theintern@discussions.microsoft.com> wrote in message
news:1D01076B-D59B-4279-B22F-2C8D1F55809E@microsoft.com...
I have a macro running each time a certain presentation is opened.
however,
if i close the presentation, and open again, it says it cannot be opened
because there is a dialogue box open, i.e. my macro is still running. i
can
force it to stop by opening the Process tab in the Task Manager, then End
Process of POWERPNT.EXT. is there any logic i can put in the macro to end
the process if the application is closed?

thanks
scott





-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ: LINK
PPTools: LINK
================================================
Live and in personable in the Help Center at PowerPoint Live
Sept 21-24, San Diego CA, USA
LINK

 

 
Steve Rindsberg
PostPosted: Wed Sep 03, 2008 2:27 pm    Post subject: Re: end process if application closed
       
You might try using the Sleep API instead of a doevents loop:

Put your macro to Sleep
LINK

I'm not sure that it'll help, but it's just possible that it might.

W/o seeing the rest of the code, it's hard to say, but it might also help to make
the polling interval shorter (much shorter). That is, have it sleep half a second
or so, then exit sub instead of continuing to loop if the presentation's gone away.

In article <12CB4CE7-BBF6-4017-A32F-4389F94B236D@microsoft.com>, Theintern wrote:
Quote:
Sub Wait2()
waitTime2 = 305
start2 = Timer
While Timer < start2 + waitTime2
DoEvents
Wend
End Sub

"Steve Rindsberg" wrote:

In article <D88C40FB-AEB7-4564-9F27-03EC40B45626@microsoft.com>, Theintern
wrote:
To run the macro at the beginning yes, but once the macro is running there is
no event trapping. I just have it insert some photos and start the
presentation, then wait 5 minutes, delete all photos and close. problem is
that i want it to kill the process completely if during those 5 minutes the
user closes PP.

How are you forcing it to wait 5 minutes?




"Bill Dilworth" wrote:

Are you using event trapping?


--
Bill Dilworth
A proud member of the Microsoft PPT MVP Team
Users helping fellow users.
LINK
-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
vestprog2@ Please read the PowerPoint FAQ pages.
yahoo. They answer most of our questions.
com LINK
..
"theintern" <theintern@discussions.microsoft.com> wrote in message
news:1D01076B-D59B-4279-B22F-2C8D1F55809E@microsoft.com...
I have a macro running each time a certain presentation is opened.
however,
if i close the presentation, and open again, it says it cannot be opened
because there is a dialogue box open, i.e. my macro is still running. i
can
force it to stop by opening the Process tab in the Task Manager, then End
Process of POWERPNT.EXT. is there any logic i can put in the macro to end
the process if the application is closed?

thanks
scott





-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ: LINK
PPTools: LINK
================================================
Live and in personable in the Help Center at PowerPoint Live
Sept 21-24, San Diego CA, USA
LINK




-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ: LINK
PPTools: LINK
================================================
Live and in personable in the Help Center at PowerPoint Live
Sept 21-24, San Diego CA, USA
LINK
 

Page 1 of 1 .:.

Google
 
Webnews.only-4-geeks.com

Windows Update | C++ | C | PHP | JavaScript | Photoshop | Programming | Windows 2000 | Python | Windows XP | Object | Flash | Flash - ActionScript | Paint Shop Pro | Excel | PowerPoint | Access | Word | Windows 98 | Internet Explorer 6.0 | CorelDraw12 | Java | XML | asm x86 | Linux Mandrake | Linux RedHat | Outlook |  | news from newsgroups |_ | s

Web Templates

Awesome Website Templates ©

zegarki filmy rusztowania sklep piƂkarski kalendarze