I have the following code that allows me to open a new Word document from Excel:
Sub createnewWordDocument()
Dim msWordApp As Word.Application
Dim doc As Word.document
Dim i As Integer
Set msWordApp = CreateObject("Word.Application")
msWordApp.Visible = True
Set doc = msWordApp.Documents.Add
With doc
For i = 1 To 100
.Content.InsertAfter "test line" & i
Next i
End With
End Sub
If I wanted to insert "Worksheet1" into the Word document in table format, how would I do that?
Bookmarks