Visual Basic - URGENTE POR FAVOR

Life is soft - evento anual de software empresarial
 
Vista:

URGENTE POR FAVOR

Publicado por ANTONIO (62 intervenciones) el 04/03/2004 12:41:31
POR FAVOR...tengo este problema..al pulsar sobre el boton para que se trasladen los datos existentes en los campos de texto..A WORD me produce un error....dicho error es a consecuencia del "if" check1.ect.....de forma q segun parece no pueden estar dentro del WITH..Y SU END WINTH

SABRIAS DECIRME Q SOLUCION DARLE A ESTE PROBLEMAZO???

UN SALUDO Y GRACIAS


Private Sub Command1_Click()

Dim Documento As New Word.Application
With Documento
'abre un documento
.Application.Documents.Open App.Path & "\ejemplo.doc"

If Check1.Value = True Then
.Documents.Item(1).Bookmarks.Item("M02").Range.Text = "X"

If Check2.Value = True Then
.Documents.Item(1).Bookmarks.Item("M03").Range.Text = "X"

If Check3.Value = True Then
.Documents.Item(1).Bookmarks.Item("M04").Range.Text = "X"

If Check4.Value = True Then
.Documents.Item(1).Bookmarks.Item("M05").Range.Text = "X"

If Check5.Value = True Then
.Documents.Item(1).Bookmarks.Item("M06").Range.Text = "X"


.Documents.Item(1).Bookmarks.Item("M01").Range.Text = Text1.Text



'mostramos documento
.Application.Visible = True


End With

Set Documento = Nothing

End Sub
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder