
11/06/2007, 11:44
|
 | | | Fecha de Ingreso: julio-2006 Ubicación: Lima, Peru
Mensajes: 708
Antigüedad: 18 años, 7 meses Puntos: 18 | |
Re: VBA EXCEL: Pasar datos UserForm a Plantilla Word, creo que voy por el buen camino Listo, coregido, ya lo probe, guiate de este:
Sub ahora()
Dim Worda As Object
Dim Documento1 As String
Set Worda = CreateObject("word.application")
Documento1 = "C:\Doc2.doc"
Worda.Documents.Open (Documento1)
NOMBRE = [a1]
APELLIDOS = [a2]
With Worda
.Selection.GoTo What:=wdGoToBookmark, Name:="NOMBRE"
.Selection.TypeText Text:=NOMBRE
.Selection.GoTo What:=wdGoToBookmark, Name:="APELLIDO"
.Selection.TypeText Text:=APELLIDOS
End With
Worda.Visible = True
Set Worda = Nothing
End Sub
Abraham |