![Escrito Excel VBA para copiar texto de um documento do Word para outro documento do Word - a formatação do rodapé não é mantida](https://rvso.com/image/1595521/Escrito%20Excel%20VBA%20para%20copiar%20texto%20de%20um%20documento%20do%20Word%20para%20outro%20documento%20do%20Word%20-%20a%20formata%C3%A7%C3%A3o%20do%20rodap%C3%A9%20n%C3%A3o%20%C3%A9%20mantida.png)
Por favor me ajude sobre o assunto. Copiei com sucesso o conteúdo de um documento do Word para outro documento do Word. Mas o formato do rodapé é alterado após colar o conteúdo. Abaixo está meu 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