S
ssissa
Hi,
When I open and close a powerpoint presentation using automation, it causes
a powerpoint presentation that is opened in IE to be closed.
TO REPRODUCE
1. Open a powerpoint presentation in IE (so that it is embedded in the
browser)
2. Run the following program
static void Main(string[] args)
{
Microsoft.Office.Interop.PowerPoint.Application app =
new Microsoft.Office.Interop.PowerPoint.ApplicationClass();
Microsoft.Office.Interop.PowerPoint.Presentation doc =
app.Presentations.Open(@"C:\test\test.ppt",
Microsoft.Office.Core.MsoTriState.msoFalse,
Microsoft.Office.Core.MsoTriState.msoFalse,
Microsoft.Office.Core.MsoTriState.msoFalse);
doc.Close();
}
OBSERVED
The presentation that was displayed in IE disappears when doc.Close() is
called.
How can I avoid this problem? That is, how can I be sure that my automation
does not disrupt the presentation that is open in IE?
It is a real issue for me, as I am working on an application that is meant
to support interaction between IE and powerpoint. Imagine:
1. User opens a powerpoint presentation in IE
2. User asks for an action on my IE toolbar
3. My application downloads the ppt content to a temporary file
4. My application extracts information from the temporary ppt document using
automation.
Thanks,
Bret
When I open and close a powerpoint presentation using automation, it causes
a powerpoint presentation that is opened in IE to be closed.
TO REPRODUCE
1. Open a powerpoint presentation in IE (so that it is embedded in the
browser)
2. Run the following program
static void Main(string[] args)
{
Microsoft.Office.Interop.PowerPoint.Application app =
new Microsoft.Office.Interop.PowerPoint.ApplicationClass();
Microsoft.Office.Interop.PowerPoint.Presentation doc =
app.Presentations.Open(@"C:\test\test.ppt",
Microsoft.Office.Core.MsoTriState.msoFalse,
Microsoft.Office.Core.MsoTriState.msoFalse,
Microsoft.Office.Core.MsoTriState.msoFalse);
doc.Close();
}
OBSERVED
The presentation that was displayed in IE disappears when doc.Close() is
called.
How can I avoid this problem? That is, how can I be sure that my automation
does not disrupt the presentation that is open in IE?
It is a real issue for me, as I am working on an application that is meant
to support interaction between IE and powerpoint. Imagine:
1. User opens a powerpoint presentation in IE
2. User asks for an action on my IE toolbar
3. My application downloads the ppt content to a temporary file
4. My application extracts information from the temporary ppt document using
automation.
Thanks,
Bret