![VBA de Excel escrito para copiar texto de un documento de Word a otro documento de Word: el formato del pie de página no se conserva](https://rvso.com/image/1595521/VBA%20de%20Excel%20escrito%20para%20copiar%20texto%20de%20un%20documento%20de%20Word%20a%20otro%20documento%20de%20Word%3A%20el%20formato%20del%20pie%20de%20p%C3%A1gina%20no%20se%20conserva.png)
Por favor ayúdenme con el tema. He copiado con éxito el contenido de un documento de Word a otro documento de Word. Pero el formato del pie de página cambia después de pegar el contenido. A continuación se muestra mi código.
Sub CopyFile_Blank()
Dim Word As New Word.Application
Dim WordDoc As New Word.Document
Dim WordDoc1 As New Word.Document
Dim dialogBox As FileDialog
Set dialogBox = Application.FileDialog(msoFileDialogOpen)
'Set the display properties - these are optional
'All the settings must be applied before the .Show command
'Do not allow multiple files to be selected
dialogBox.AllowMultiSelect = False
'Set the title of of the DialogBox
dialogBox.Title = "Select a file"
'Show the dialog box and output full file path and file name
If dialogBox.Show = -1 Then
MsgBox "You selected: " & dialogBox.SelectedItems(1)
End If
Dest_File = "C:\test\test.docx"
Doc_Path = Dest_File
Set WordDoc1 = Word.Documents.Open(dialogBox.SelectedItems(1), ReadOnly:=True)
WordDoc1.Range.Copy
Set WordDoc = Word.Documents.Open(Doc_Path, ReadOnly:=True)
WordDoc.Range.PasteAndFormat wdFormatOriginalFormatting
WordDoc.ActiveWindow.Visible = True
WordDoc1.Close
End Sub