Visual Basic - DUDA CON PLANTILLA DE WORD

Life is soft - evento anual de software empresarial
 
Vista:

DUDA CON PLANTILLA DE WORD

Publicado por alberto (35 intervenciones) el 21/05/2007 13:58:54
ESTOY TRABAJANDO CON UNA PLANTILLA DE WORD QUE DEBO LLENAR CON UNA LISTA DE PERSONAS, Y LA ULTIMA LINEA DE ESTA LISTA DEBE IR EN UN CUERPO MAS GRANDE Y EN NEGRITA. EL PROBLEMA ES QUE LA CANTIDAD DE PERSONAS PUEDE VARIAR Y EN CONSECUENCIA ESTA ULTIMA LINEA PUEDE ESTAR EN CUALQUIER LADO POR LO QUE NO PUEDO FORMATERALA EN LA PALNTILLA. COMO PUEDO FORMATERALA DE VB?

Dim xWord As Word.Application ' Instancia a Word
Dim xRange As Range ' Rango del objeto
Dim xSelection As Find ' Búsqueda del objeto
Set xWord = New Word.Application

Dim tripulante, tripnumero As String
For CICLO = 1 To (mfglistatripulantes.Rows - 2)
tripulante = "* " & mfglistatripulantes.TextMatrix(CICLO, 1) & ", " & mfglistatripulantes.TextMatrix(CICLO, 2)
tripulante = tripulante & " de nacionalidad " & mfglistatripulantes.TextMatrix(CICLO, 6) & ","
tripulante = tripulante & " quien se documenta con " & mfglistatripulantes.TextMatrix(CICLO, 7) & ","
tripulante = tripulante & " nacido el " & mfglistatripulantes.TextMatrix(CICLO, 5) & ","
tripulante = tripulante & " para desarrollar tareas como " & mfglistatripulantes.TextMatrix(CICLO, 3) & "."
tripnumero = "%tripulante" & CICLO & "%"

Set xRange = xWord.ActiveDocument.Range
xRange.Find.Execute tripnumero, , , , , , , , , tripulante, True

Next CICLO
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