fork(1) download
  1. Imports Microsoft.Office.Interop
  2.  
  3. Module Module1
  4. Sub Main()
  5. ' Open the presentation
  6. Dim myApp = New PowerPoint.Application()
  7. Dim sName As String
  8.  
  9. sName = InputBox$(" Δώσε το πλήρες path του αρχείου : ", "Παράθυρο Διαλόγου ")
  10. MsgBox("Άνοιγμα του : " & sName)
  11.  
  12. myApp.Visible = msoTrueDim
  13. MyPresentation = myApp.Presentations.Open(sName, msoTrue, msoTrue, True)
  14.  
  15. ' get the first slide
  16. Dim MyFirstSlide = MyPresentation.Slides(1)
  17. Dim sb = String.Empty
  18.  
  19. ' iterate through all shapes in slide and get text
  20. For i = 1 To MyFirstSlide.Shapes.Count
  21. sb = sb & MyFirstSlide.Shapes.Item(i).TextFrame.TextRange.Text & Environment.NewLine
  22. Next (i)
  23.  
  24. ' show message box with the texts
  25. MsgBox(sb.ToString)
  26. ' close presentation
  27. MyPresentation.Close()
  28. End Sub
  29.  
  30. Private Function MyPresentation() As Object
  31. Throw New NotImplementedException
  32. End Function
  33.  
  34. Private Function msoTrue() As Microsoft.Office.Core.MsoTriState
  35. Throw New NotImplementedException
  36. End Function
  37.  
  38. Private Function ppt_filename() As String
  39. Throw New NotImplementedException
  40. End Function
  41.  
  42. Private Function msoTrueDim() As Microsoft.Office.Core.MsoTriState
  43. Throw New NotImplementedException
  44. End Function
  45.  
  46. End Module
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Visual Basic.Net Compiler version 0.0.0.5914 (Mono 2.4.2 - r)
Copyright (C) 2004-2008 Rolf Bjarne Kvinge. All rights reserved.


/home/MwDkmH/prog.vb (1,20) : Error VBNC30456: 'Office' is not a member of 'Global.Microsoft'.
/home/MwDkmH/prog.vb (1,20) : Warning VBNC40056: The import 'Microsoft.Office.Interop' could not be found.
1 errors, but compilation succeeded? Resolve
/home/MwDkmH/<MyGenerator> (1,1) : Error VBNC99999: Unexpected error: There has been an internal error in the compiler: Consistency check failed
  at vbnc.Compiler.VerifyConsistency (Boolean result, System.String Location) [0x000a3] in /var/tmp/portage/dev-lang/mono-basic-2.4.2/work/mono-basic-2.4.2/vbnc/vbnc/source/General/Compiler.vb:132 
  at vbnc.Compiler.Compile_Resolve () [0x00070] in /var/tmp/portage/dev-lang/mono-basic-2.4.2/work/mono-basic-2.4.2/vbnc/vbnc/source/General/Compiler.vb:403 
  at vbnc.Compiler.Compile () [0x0028a] in /var/tmp/portage/dev-lang/mono-basic-2.4.2/work/mono-basic-2.4.2/vbnc/vbnc/source/General/Compiler.vb:561 
Compilation took 00:00:00.6906920
stdout
Standard output is empty