T
Thomas Wieczorek
Hello!
I am using late binding to start PowerPoint. I have two versions of
it: PowerPoint 2003 on my development PC and 2007 at the client.
Starting PowerPoint works on both machines, but I can't run a
presentation on the other computer.
I get a COMException, when I start it:
Exception in PowerPointViewer.Start():
System.Runtime.InteropServices.COMException (0x80004005): Unspecified
error
at
Microsoft.VisualBasic.CompilerServices.LateBinding.LateGet(Object o,
Type objType, String name, Object[] args, String[] paramnames,
Boolean[] CopyBack)
at PowerPointViewer.Start()
I already looked at http://support.microsoft.com/kb/814912/en-us, but
it doesn't soll my problem.
<code>
Class PowerPointViewer
Private Shared powerpointApp As Object = Nothing
Private presentation As Object
Private filePath as String
Public Sub New(ByVal _filePath As String)
filePath = _filePath
End Sub
Sub Start()
If IsNothing(powerpointApp) Then
Log("Start PowerPoint ")
powerpointApp = CreateObject("PowerPoint.Application")
End If
Log("Open PowerPoint Presentation" & filePath)
' HERE: The COMException happens when calling Open
presentation = powerpointApp.Presentations.Open(filePath, , ,
False)
' this doesn't work, too
'presentation = powerpointApp.Presentations.Open(filePath, False,
False, False)
' some code ommited
presentation.Run()
End Sub
End Class
</code>
I am using .Net 1.1.4332 and Visual Studio 2003
I am using late binding to start PowerPoint. I have two versions of
it: PowerPoint 2003 on my development PC and 2007 at the client.
Starting PowerPoint works on both machines, but I can't run a
presentation on the other computer.
I get a COMException, when I start it:
Exception in PowerPointViewer.Start():
System.Runtime.InteropServices.COMException (0x80004005): Unspecified
error
at
Microsoft.VisualBasic.CompilerServices.LateBinding.LateGet(Object o,
Type objType, String name, Object[] args, String[] paramnames,
Boolean[] CopyBack)
at PowerPointViewer.Start()
I already looked at http://support.microsoft.com/kb/814912/en-us, but
it doesn't soll my problem.
<code>
Class PowerPointViewer
Private Shared powerpointApp As Object = Nothing
Private presentation As Object
Private filePath as String
Public Sub New(ByVal _filePath As String)
filePath = _filePath
End Sub
Sub Start()
If IsNothing(powerpointApp) Then
Log("Start PowerPoint ")
powerpointApp = CreateObject("PowerPoint.Application")
End If
Log("Open PowerPoint Presentation" & filePath)
' HERE: The COMException happens when calling Open
presentation = powerpointApp.Presentations.Open(filePath, , ,
False)
' this doesn't work, too
'presentation = powerpointApp.Presentations.Open(filePath, False,
False, False)
' some code ommited
presentation.Run()
End Sub
End Class
</code>
I am using .Net 1.1.4332 and Visual Studio 2003