From: cwang on
Hello,
I am writing a program to convert a bunch of ppt files into JPEG files. Here
is the description of my program:

try {
Application pptApp = new Application();
foreach (pptFile in pptFiles) {
Presentation pres = pptApp.Presentations.Open(pptFile,
Microsoft.Office.Core.MsoTriState.msoTrue,

Microsoft.Office.Core.MsoTriState.msoFalse,

Microsoft.Office.Core.MsoTriState.msoFalse);
pres.SaveAs(folder, PpSaveAsFileType.ppSaveAsJPG,
Microsoft.Office.Core.MsoTriState.msoTrue);
pres.Close();
} catch (Exception e) {
System.Console.WriteLine(e.Message);
}

pptApp.Quit();


After running a while, I got the error message as: The message filter
indicated that the application is busy. (Exception from HRESULT: 0x8001010A
(RPC_E_SERVERCALL_RETRYLATER)).
My qyestions are:
1. What does this mean?
2. How to solve the problem?
3. How to check if the Powerpnt application is running and get it before I
call "new Applicaion"?

Thanks a lot!


From: Steve Rindsberg on
In article <91E2E341-511E-4BA1-B8B1-75B4428CC09A(a)microsoft.com>, Cwang wrote:
> Hello,
> I am writing a program to convert a bunch of ppt files into JPEG files. Here
> is the description of my program:
>
> try {
> Application pptApp = new Application();
> foreach (pptFile in pptFiles) {
> Presentation pres = pptApp.Presentations.Open(pptFile,
> Microsoft.Office.Core.MsoTriState.msoTrue,
>
> Microsoft.Office.Core.MsoTriState.msoFalse,
>
> Microsoft.Office.Core.MsoTriState.msoFalse);
> pres.SaveAs(folder, PpSaveAsFileType.ppSaveAsJPG,
> Microsoft.Office.Core.MsoTriState.msoTrue);
> pres.Close();
> } catch (Exception e) {
> System.Console.WriteLine(e.Message);
> }
>
> pptApp.Quit();
>
> After running a while, I got the error message as: The message filter
> indicated that the application is busy. (Exception from HRESULT: 0x8001010A
> (RPC_E_SERVERCALL_RETRYLATER)).
> My qyestions are:
> 1. What does this mean?
> 2. How to solve the problem?

> 3. How to check if the Powerpnt application is running and get it before I
> call "new Applicaion"?

Not sure about the others, but if I understand the last question correctly, it
shouldn't matter. PPT only allows a single instance of itself.

-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================


From: Chirag on
"cwang" <cwang(a)discussions.microsoft.com> wrote in message
news:91E2E341-511E-4BA1-B8B1-75B4428CC09A(a)microsoft.com...
> Hello,
> I am writing a program to convert a bunch of ppt files into JPEG files.
> Here
> is the description of my program:
>
> try {
> Application pptApp = new Application();
> foreach (pptFile in pptFiles) {
> Presentation pres = pptApp.Presentations.Open(pptFile,
>
> Microsoft.Office.Core.MsoTriState.msoTrue,
>
> Microsoft.Office.Core.MsoTriState.msoFalse,
>
> Microsoft.Office.Core.MsoTriState.msoFalse);
> pres.SaveAs(folder, PpSaveAsFileType.ppSaveAsJPG,
> Microsoft.Office.Core.MsoTriState.msoTrue);
> pres.Close();
> } catch (Exception e) {
> System.Console.WriteLine(e.Message);
> }
>
> pptApp.Quit();
>
>
> After running a while, I got the error message as: The message filter
> indicated that the application is busy. (Exception from HRESULT:
> 0x8001010A
> (RPC_E_SERVERCALL_RETRYLATER)).
> My qyestions are:
> 1. What does this mean?
> 2. How to solve the problem?

See if the following link applies to your case:
http://support.microsoft.com/kb/246018

> 3. How to check if the Powerpnt application is running and get it before I
> call "new Applicaion"?

In .net, this would be through the Marshal object:
System.Runtime.InteropServices.Marshal.GetActiveObject("PowerPoint.Application")

If you get an active instance, you should not call Quit() on it otherwise
the other folks may end up with dangling references.

- Chirag

PowerShow: View multiple PowerPoint slide shows simultaneously
http://officeone.mvps.org/powershow/powershow.html

>
> Thanks a lot!
>

From: Steve Rindsberg on
> > My qyestions are:
> > 1. What does this mean?
> > 2. How to solve the problem?
>
> See if the following link applies to your case:
> http://support.microsoft.com/kb/246018

Thanks, Chirag.

Sheesh. Norton again.

I wonder if they'll ever come up with a product that causes fewer problems than it
allegedly protects against? ;-)