Reference namespace
Word = Excel = PowerPoint = Microsoft.Office.Interop.PowerPoint;
Word file reading
text = Word.ApplicationClass app = Word.Document doc = readOnly = missing = fileName = app = doc = app.Documents.Open( fileName, missing, readOnly, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, text = doc.Content.Text.Replace(, .Empty).Replace(, .Empty).Replace(, doc.Close( missing, missing, doc = app.Quit( missing, missing, app = }
Reading Excel files
text = Excel.ApplicationClass app = Excel.Workbook book = readOnly = missing = fileName = app = book = (Excel.Worksheet sheet ( i = ; i <= sheet.UsedRange.Cells.Rows.Count; i++ ( j = ; j <= sheet.UsedRange.Cells.Columns.Count; j++ text += ((Excel.Range)sheet.Cells[i, j]).Text.ToString().Replace(, .Empty).Replace(, .Empty).Replace(, .Empty) + book = app = }
Pptfile reading
text = Excel.ApplicationClass app = Excel.Workbook book = readOnly = missing = fileName = app = book = (Excel.Worksheet sheet ( i = ; i <= sheet.Rows.Count; i++ ( j = ; j <= sheet.Columns.Count; j++ text += ((Excel.Range)sheet.Cells[i, j]).Text.ToString().Replace(, .Empty).Replace(, .Empty).Replace(, .Empty) + book = app = }