ASP.NET Using VB to Open PPT file


if you need to open a ppt file thru asp.net web application using VB.NET language and The code starts the POWERPOINT.EXE process(check it in the task manager) but does not display anything. It just shows the blank aspx page. then use the following method

following code will solve the above mentioned problem.

 
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


If it is not working then use late binding that it will sure works


Comments

No responses found. Be the first to comment...


  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:
    Email: