RE:abrir documendo en word desde vb 2005
Publicado por
FENUA73 (1 intervención) el 20/10/2007 11:28:17
Dim WORD As Object
Dim filename As String
filename = "c:\temp\TETE.doc"
' Inicia Word y abre el documento
WORD = CreateObject("Word.Application")
On Error Resume Next
WORD.Documents.Open(filename)
If Err.Number <> 0 Then
MsgBox("Documento no Encontrado!" , vbCritical, "Error")
Exit Sub
End If
' you have to open Excel to work on it
WORD.Application.Visible = True
WORD.Parent.Windows(1).Visible = True