Home › Forums › Bug Report › Unable to import PowerPoint presentation
- This topic has 48 replies, 14 voices, and was last updated 9 years, 2 months ago by
alain.
-
AuthorPosts
-
May 13, 2014 at 18:15 #9284
Tghannou
MemberHy Alin,
Can you show us the code of “checkppt” app, please.
This code dont work, i’ve done won’t work
Microsoft.Office.Interop.PowerPoint.ApplicationClass powerPointApplication = new Microsoft.Office.Interop.PowerPoint.ApplicationClass();
Microsoft.Office.Interop.PowerPoint.Presentation presentation = null;
try
{
SourceDocPath = SourceDocPath.ToLowerInvariant();presentation = powerPointApplication.Presentations.Open(SourceDocPath,
Microsoft.Office.Core.MsoTriState.msoTrue,
Microsoft.Office.Core.MsoTriState.msoTrue,
Microsoft.Office.Core.MsoTriState.msoTrue);}
catch (Exception ex)
{
textBox1.Text = ex.Message + Environment.NewLine + ex.StackTrace;
}
finally
{
// Quit PowerPoint and release the ApplicationClass object.
if (presentation != null)
{
presentation.Close();
presentation = null;
}
if (powerPointApplication != null)
{
powerPointApplication.Quit();
powerPointApplication = null;
}
GC.Collect();
GC.WaitForPendingFinalizers();
}Thanks
June 15, 2015 at 09:32 #9285jinu
MemberI have the “PowerPoint could not open the file” issue when website run under IIS Application pool Identity NOT an Administrator User.
Everything okay under an Administrator User.
Unfortunately, Administrator User not feasible at the Production environment.
Is Administrator privileges mandatory for PowerPoint automation this way?
Please advise.February 1, 2016 at 19:03 #9286sudesh1456
MemberHi Alain,
I’m getting this error.output:
Check CURRENT_USER…
Found nothing
Check LOCAL_MACHINE…
Found something: C:\PROGRA~2\MICROS~1\Office14\POWERPNT.EXE
Check if file exists
Found.
Check version
major: 14
minor: 0
Connect to PPT DLL
Connected to PPT DLL
Connect Error
System.InvalidCastException: Unable to cast COM object of type ‘Microsoft.Office.Interop.PowerPoint.ApplicationClass’ to interface type ‘Microsoft.Office.Interop.PowerPoint._Application’. This operation failed because the QueryInterface call on the COM component for the interface with IID ‘{91493442-5A91-11CF-8700-00AA0060263B}’ failed due to the following error: Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED)).
at Microsoft.Office.Interop.PowerPoint.ApplicationClass.get_Presentations()
at check_ppt.Form1..ctor()
Unable to cast COM object of type ‘Microsoft.Office.Interop.PowerPoint.ApplicationClass’ to interface type ‘Microsoft.Office.Interop.PowerPoint._Application’. This operation failed because the QueryInterface call on the COM component for the interface with IID ‘{91493442-5A91-11CF-8700-00AA0060263B}’ failed due to the following error: Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED)).
at Microsoft.Office.Interop.PowerPoint.ApplicationClass.get_Presentations()
at check_ppt.Form1..ctor()Please help.
February 2, 2016 at 06:45 #9287alain
Keymaster -
AuthorPosts
- The forum ‘Bug Report’ is closed to new topics and replies.