In Previous Article we saw how to Copy Content from a Word Document and Paste in in to the Active Workbook. Now in this Article i am going to write a function will Select a Range from Excel and paste the content in a New Word Document.
Here there are two possible way of copying and pasting in Word Document. Also while pasting in the word Document you can format the Doc as per your requirement. Below 3rd point describe about that.

1. Copy only the Content and paste it in Word Document as Content.


Sub CopyToWord()

    Dim objWord As New Word.Application
    'Copy the range Which you want to paste in a New Word Document
    Range("A1:B10").Copy

    With objWord
        .Documents.Add
        .Selection.Paste
        .Visible = True
    End With

End Sub

2. Copy the Excel Range as Picture and paste it in word Doc.


Sub CopyToWord()

    Dim objWord As New Word.Application
    'Copy the range Which you want to paste in a
    ' New Word Document as a Picture
    Range("A1:B10").CopyPicture xlPrinter

    With objWord
        .Documents.Add
        .Selection.Paste
        .Visible = True
    End With

End Sub

3. Font Formatting of Word Document while pasting


Sub CopyRangeToWord()

	Dim objWord As New Word.Application
	Dim objDoc As New Word.Document

	Set objDoc = objWord.Documents.Add
	objWord.Visible = True
	Range("A1:B10").Copy
	 With objDoc.Paragraphs(objDoc.Paragraphs.Count).Range
           'All formatting goes here
	    .Paste
	    .Font.Name = "broadway"
	    .Font.Color = wdColorBlue
	    .Font.Bold = True
	    .Font.Italic = True
         .Font.Allcaps = True
         .Font.Size = 20
	End With

End Sub

cover3d_0-89071700_1484285537__1_

Join over 10, 000+ Excel VBA Enthusiasts & get this FREE e-Book Now!