G
Guest
PowerPoint.Application cannot open PPT file
I am trying to use the following code using to open a PPT file using VS.NET 2003 and PowerPoint 2003
Option Strict Off
Imports System.Runtime.InteropServices
Imports Microsoft.Office.Interop
Imports Microsoft.Office.Interop.PowerPoint
Imports Microsoft.Office.Core
Imports Microsoft.Office.Core.MsoControlType
Imports Microsoft.Office.Core.MsoButtonStyle
Imports Microsoft.Office.Core.MsoFileDialogType
Imports Microsoft.Office.Core.MsoFileDialogView
Imports Microsoft.Office.Core.MsoTriState
Sub openPPT()
Dim oPowerApp As Object
oPowerApp = CreateObject("PowerPoint.Application")
oPowerApp.WindowState = PowerPoint.PpWindowState.ppWindowNormal
oPowerApp.Presentations.Open("C:\TestMedia\w\PPT\ADB_MEET.PPT")
End Sub
When I try this I get the following error:
C:\EDDWorkArea\testarea\OfficeAPI\Form1.vb(163): Reference required to assembly 'office' containing the type 'Microsoft.Office.Core.MsoTriState'. Add one to your project.
On Line: oPowerApp.Presentations.Open("C:\TestMedia\w\PPT\ADB_MEET.PPT")
I have been stumped on this for the last couple of days and I have gotten no were. I have gotten this to work in PowerPoint2002 with no problems. This issues can also be duplicated on multip machines.
Any help would be greatly appricated.
Thanks,
Ryan
I am trying to use the following code using to open a PPT file using VS.NET 2003 and PowerPoint 2003
Option Strict Off
Imports System.Runtime.InteropServices
Imports Microsoft.Office.Interop
Imports Microsoft.Office.Interop.PowerPoint
Imports Microsoft.Office.Core
Imports Microsoft.Office.Core.MsoControlType
Imports Microsoft.Office.Core.MsoButtonStyle
Imports Microsoft.Office.Core.MsoFileDialogType
Imports Microsoft.Office.Core.MsoFileDialogView
Imports Microsoft.Office.Core.MsoTriState
Sub openPPT()
Dim oPowerApp As Object
oPowerApp = CreateObject("PowerPoint.Application")
oPowerApp.WindowState = PowerPoint.PpWindowState.ppWindowNormal
oPowerApp.Presentations.Open("C:\TestMedia\w\PPT\ADB_MEET.PPT")
End Sub
When I try this I get the following error:
C:\EDDWorkArea\testarea\OfficeAPI\Form1.vb(163): Reference required to assembly 'office' containing the type 'Microsoft.Office.Core.MsoTriState'. Add one to your project.
On Line: oPowerApp.Presentations.Open("C:\TestMedia\w\PPT\ADB_MEET.PPT")
I have been stumped on this for the last couple of days and I have gotten no were. I have gotten this to work in PowerPoint2002 with no problems. This issues can also be duplicated on multip machines.
Any help would be greatly appricated.
Thanks,
Ryan