Ver Mensaje Individual
  #5 (permalink)  
Antiguo 22/07/2008, 13:25
skato0000
 
Fecha de Ingreso: marzo-2008
Mensajes: 10
Antigüedad: 17 años, 2 meses
Puntos: 0
Respuesta: ¿porque desaparece la informacion?

TIENES RAZON, PERDON, ESTA ES LA FUNCION:

Public Sub InformacionTerminoSocial()
Dim TITULO As String
Dim Info As String 'variables para guardar el texto
Dim Info2 As String

TITULO = " CARTA DE TÉRMINO" & vbCrLf & ""
Info = " " & frmCartaTerminoSocial.Text1.Text & vbCrLf & vbCrLf & vbCrLf & vbCrLf & vbCrLf & frmCartaTerminoSocial.Text2.Text & vbCrLf & vbCrLf & frmCartaTerminoSocial.Text3.Text & vbCrLf & frmCartaTerminoSocial.Text16.Text & vbCrLf & frmCartaTerminoSocial.Text17.Text & vbCrLf & frmCartaTerminoSocial.Text18.Text & vbCrLf & "Presente.-" & vbCrLf & vbCrLf & "Se hace constar que: " & frmCartaTerminoSocial.Text4.Text & vbCrLf & "Alumno(a) de esa Institución Educativa de la carrera de " & frmCartaTerminoSocial.Text5.Text & " con cuenta escolar " & frmCartaTerminoSocial.Text6.Text & " realizó satisfactoriamente la prestación de su(s) " & frmCartaTerminoSocial.Text7.Text & " del " & frmCartaTerminoSocial.Text8.Text & " al " & frmCartaTerminoSocial.Text9.Text & " en el Área Usuaria: " & frmCartaTerminoSocial.Text10.Text & " con horario de " & frmCartaTerminoSocial.Text12.Text & ""
Info2 = "cubriendo un total de " & frmCartaTerminoSocial.Text14.Text & "horas, y desarrolló las siguientes actividades: " & frmCartaTerminoSocial.DataList1.Text & vbCrLf & vbCrLf & vbCrLf & vbCrLf & vbCrLf & "y bajo la asesoría de " & frmCartaTerminoSocial.Text21.Text & vbCrLf & vbCrLf & "Lo que comunico a usted para los efectos legales y administrativos a que haya lugar." & vbCrLf & vbCrLf & vbCrLf & vbCrLf & " " & frmCartaTerminoSocial.Text19.Text & vbCrLf & " " & frmCartaTerminoSocial.Text15.Text & " " & frmCartaTerminoSocial.Text20.Text & ""
Call GenerarArchivo2(TITULO, Info, Info2)
End Sub

Y ESTO TAMBIEN:

Public Sub GenerarArchivo2(TITULO As String, Info As String, Info2 As String)
Dim MSWord As New Word.Application 'se declara vairable del tipo word
Dim Documento As Word.Document 'se declara variable de tipo documento de word
Dim Parrafo As Paragraph 'se declara variable de tipo parrafo

Set MSWord = CreateObject("Word.Application") ' se crean objetos
Set Documento = MSWord.Documents.Add
Set Parrafo = Documento.Paragraphs.Add

Clipboard.Clear 'se limpia portapapeles de office
Clipboard.SetData frmCartaTerminoSocial.Picture1.Picture 'se pone la imagen en el portapapeles


MSWord.Selection.Paste 'primero pegamos la imagen
Clipboard.Clear 'limpiamos portapapeles

Clipboard.SetData frmCartaTerminoSocial.Picture2.Picture 'se pone la imagen en el portapapeles
MSWord.Selection.Paste 'primero pegamos la imagen

Clipboard.Clear 'limpiamos portapapeles
Parrafo.Range.InsertAfter TITULO & vbCrLf & Info & vbCrLf & Info2 'insertamos las variables con en texto"
MSWord.Visible = True 'abrimos el archivo
End Sub