fork download
  1. Imports Microsoft.Office.Interop
  2. Imports Microsoft.Office.Core.MsoTriState
  3.  
  4. Module Module1
  5. Sub Main()
  6. ' Open the presentation
  7. Dim myApp = New PowerPoint.Application()
  8. Dim sName As String
  9.  
  10. sName = InputBox$(" Δώσε το πλήρες path του αρχείου : ", "Παράθυρο Διαλόγου ")
  11.  
  12. Dim somevar = New System.IO.FileInfo(sName)
  13.  
  14. If somevar.Directory.Exists = False Then
  15. MsgBox("Δεν βρέθηκε η διαδρομή" & somevar.DirectoryName & ".")
  16. Else
  17. If somevar.Exists = False Then
  18. MsgBox("Το αρχείο" & somevar.Name & "δεν βρέθηκε στην διαδρομή" & somevar.DirectoryName & ".")
  19. Else
  20. MsgBox("Άνοιγμα του : " & sName)
  21. End If
  22. End If
  23.  
  24. myApp.Visible = msoTrue
  25. Dim MyPresentation = myApp.Presentations.Open(sName, msoTrue, msoTrue, True) 'MyPresentation -> Αντικείμενο παρουσίασης
  26.  
  27. ' get the first slide
  28. Dim MyFirstSlide = MyPresentation.Slides(1)
  29. Dim sb = String.Empty
  30.  
  31. ' iterate through all shapes in slide and get text
  32. For i = 1 To MyFirstSlide.Shapes.Count
  33. sb = sb & MyFirstSlide.Shapes.Item(i).TextFrame.TextRange.Text & Environment.NewLine
  34. Next (i)
  35.  
  36. ' show message box with the texts
  37. MsgBox(sb.ToString)
  38. ' close presentation
  39. MyPresentation.Close()
  40. End Sub
  41.  
  42. 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/VdXJyA/prog.vb (1,20) : Error VBNC30456: 'Office' is not a member of 'Global.Microsoft'.
/home/VdXJyA/prog.vb (1,20) : Warning VBNC40056: The import 'Microsoft.Office.Interop' could not be found.
/home/VdXJyA/prog.vb (2,19) : Error VBNC30456: 'Office' is not a member of 'Global.Microsoft'.
/home/VdXJyA/prog.vb (2,19) : Warning VBNC40056: The import 'Microsoft.Office.Core.MsoTriState' could not be found.
2 errors, but compilation succeeded? Resolve
/home/VdXJyA/<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.6987940
stdout
Standard output is empty