Sub read1() Dim missing As Object = System.Reflection.Missing.Value Dim oFals As Object = False Dim oTru As Object = True Try objapp = New word.Application objdoc = New word.Document Dim obj As Object = ListBox1.SelectedItem If ListBox1.SelectedIndex < 0 Then Else If ListBox1.Items.Count > 0 Then objdoc = objapp.Documents.Open(obj, missing, oTru, oTru) objapp = New word.Application objdoc = New word.Document objdoc = objapp.Documents.Add(obj) objdoc.SaveAs("d:\wrrd.doc") objdoc.Activate() objdoc.Close() objapp.Quit() objdoc = Nothing objapp = Nothing End If End If Catch ex As Exception MsgBox("read error") End Try End Sub
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)