It is necessary to copy the desired range and paste it into the Word without a table, as plain text with a given text format. But only the bottom text works with the specified ".Past". I tried to write ".PastSpecial" in different ways, but it produces Debug. Where is the mistake?

`Sub Word() Dim objWord Dim objDoc Dim objSelection '------------------------------------------------- Set objWord = CreateObject("Word.Application") Set objDoc = objWord.Documents.Add objWord.Visible = True Set objSelection = objWord.Selection Range("B51:B60").Copy With objDoc.Paragraphs(objDoc.Paragraphs.Count).Range 'All formatting goes here .Paste .Font.Name = "Times New Roman" .Font.Color = black .Font.Size = 11 End With objDoc.SaveAs ("D:\MyFirstSave") End Sub` 

    1 answer 1

    You will need to connect (Tools -> References) Microsoft Word *.* Object Library

     Sub ExportValueFromTable() Dim wApp As Word.Application Dim wDoc As Word.Document Set wApp = CreateObject("Word.Application") Set wDoc = wApp.Documents.Add wApp.Visible = False Range("A1:A7").Copy wApp.Selection.PasteAndFormat wdFormatPlainText With wDoc.Range .Font.Name = "Times New Roman" .Font.Color = Black .Font.Size = 11 End With wApp.Visible = True End Sub