Imports Microsoft.Office.InteropImports Imports Microsoft.Office.Core.MsoTriState Imports Microsoft.Office.Interop.PowerPoint Imports Microsoft.Office.Interop Imports System.Data.OleDbModule Imports System.Data.OleDb Module Module1 Sub Main() Dim myApp = New PowerPoint.Application() myApp.Visible = msoTrue Dim MyPresentation = myApp.Presentations.Open("C:\Users\owner\Desktop\Trials.pptx", msoTrue, msoTrue, True) ' get the first slide Dim MyFirstSlide = MyPresentation.Slides(1) Dim sqlQueries As New ArrayList Dim sqlres As String Try For i = 1 To MyFirstSlide.Shapes.Item(1).Table.Rows.Count Dim row = MyFirstSlide.Shapes.Item(1).Table.Rows.Item(i) 'Get desired values from ppt table Dim firstColVal = row.Cells(2).Shape.TextFrame.TextRange.Text.Trim() Dim secondColVal = row.Cells(3).Shape.TextFrame.TextRange.Text.Trim() 'Build the sql update command for the db Console.WriteLine("This is val of secondColVal " + secondColVal) Console.WriteLine("This is val of firstColVal " + firstColVal) sqlQueries.Add("UPDATE SHIPS SET PROBLEMS = '" & secondColVal & "' WHERE NAME='" & firstColVal & "'") Next 'MSAccess stuff 'Open connection to db Dim connection = New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source= C:\database.accdb") connection.Open() 'Perform each query one-by-one For Each query In sqlQueries Dim cmd = New OleDbCommand(query, connection) Dim icount = cmd.ExecuteNonQuery Next 'Close connection connection.Close() Catch ex As Exception MsgBox(ex.Message) End Try MyPresentation.Close() End Sub End Module
Standard input is empty
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/p88oVQ/prog.vb (1,20) : Error VBNC30456: 'Office' is not a member of 'Global.Microsoft'. /home/p88oVQ/prog.vb (1,20) : Warning VBNC40056: The import 'Microsoft.Office.InteropImports' could not be found. /home/p88oVQ/prog.vb (2,19) : Error VBNC30456: 'Office' is not a member of 'Global.Microsoft'. /home/p88oVQ/prog.vb (2,19) : Warning VBNC40056: The import 'Microsoft.Office.Core.MsoTriState' could not be found. /home/p88oVQ/prog.vb (3,19) : Error VBNC30456: 'Office' is not a member of 'Global.Microsoft'. /home/p88oVQ/prog.vb (3,19) : Warning VBNC40056: The import 'Microsoft.Office.Interop.PowerPoint' could not be found. /home/p88oVQ/prog.vb (4,19) : Error VBNC30456: 'Office' is not a member of 'Global.Microsoft'. /home/p88oVQ/prog.vb (4,19) : Warning VBNC40056: The import 'Microsoft.Office.Interop' could not be found. /home/p88oVQ/prog.vb (5,16) : Error VBNC30456: 'OleDbModule' is not a member of 'Global.System.Data'. /home/p88oVQ/prog.vb (5,16) : Warning VBNC40056: The import 'System.Data.OleDbModule' could not be found. 5 errors, but compilation succeeded? Resolve /home/p88oVQ/<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.6537950
Standard output is empty