Ver Mensaje Individual
  #4 (permalink)  
Antiguo 09/04/2008, 05:26
iaras66
 
Fecha de Ingreso: octubre-2007
Mensajes: 36
Antigüedad: 17 años, 6 meses
Puntos: 0
Re: Copiar y pegar todo el texto de un Word a otro mediante visual basic 6.0

Bueno el codigo mas bien queda así (alguna ayuda??):

.Selection.WholeStory
.Selection.Copy
.ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
'Para que en todos los encabezados sea igual

'Para alinear el texto a la derecha



.Selection.ParagraphFormat.Alignment = wdAlignParagraphRight
Documento.Selection.Font.Name = "Times News Roman"
Documento.Selection.Font.Size = 11


.Selection.ParagraphFormat.Alignment = wdAlignParagraphRight
.Application.Selection.TypeText "Nº Página" & vbNewLine

.Selection.ParagraphFormat.Alignment = wdAlignParagraphRight
Documento.Selection.Sections(1).Headers(1).PageNum bers.Add PageNumberAlignment:= _
wdAlignPageNumberRight, FirstPage:=True


Documento.Selection.Font.Name = "Times News Roman"
Documento.Selection.Font.Size = 11
With Selection.ParagraphFormat

.RightIndent = CentimetersToPoints(0.11)
.SpaceBeforeAuto = False
.SpaceAfterAuto = False

End With

.Application.Selection.TypeText "Nº Cuestionario" + " " & numinicio

numinicioval = numinicio + 1
For i = numinicioval To numfinal
Set oword = CreateObject("Word.Application")
oword.Visible = True
Set oDoc = oword.Documents.Add
.Selection.PasteAndFormat (wdPasteDefault)

.ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
'Para que en todos los encabezados sean iguales

'Para alinear el texto a la derecha



.Selection.ParagraphFormat.Alignment = wdAlignParagraphRight
Documento.Selection.Font.Name = "Times News Roman"
Documento.Selection.Font.Size = 11


.Selection.ParagraphFormat.Alignment = wdAlignParagraphRight
.Application.Selection.TypeText "Nº Página" & vbNewLine

.Selection.ParagraphFormat.Alignment = wdAlignParagraphRight
Documento.Selection.Sections(1).Headers(1).PageNum bers.Add PageNumberAlignment:= _
wdAlignPageNumberRight, FirstPage:=True


Documento.Selection.Font.Name = "Times News Roman"
Documento.Selection.Font.Size = 11
With Selection.ParagraphFormat

.RightIndent = CentimetersToPoints(0.11)
.SpaceBeforeAuto = False
.SpaceAfterAuto = False

End With
.Application.Selection.TypeText "Nº Cuestionario" + " " & i
Next i



'intro



'mostramos documento
.Application.Visible = True
End With
Set Documento = Nothing

Lo dicho alguna ayuda?????