So I created a file in excell where I have different rows with different items. In the column next to each Item I write yes or no to. Then I want vb script to make a new document in word, and for every yes insert a certain doc file into the new word document.
So far this is what I have:
Sub createDocNew()
Dim appWord As Word.Application
Dim oWord As Word.Application
Dim currDoc As Word.Document
Dim currDataSheet As Worksheet
Dim addressee As String
Set currDataSheet = ActiveSheet
Set appWord = CreateObject("Word.Application"
appWord.Visible = True
Set currDoc = appWord.Documents.Add()
but I don't know how to use epression.inserfile(filename) command. It keeps giving me an error.
End Sub
So far this is what I have:
Sub createDocNew()
Dim appWord As Word.Application
Dim oWord As Word.Application
Dim currDoc As Word.Document
Dim currDataSheet As Worksheet
Dim addressee As String
Set currDataSheet = ActiveSheet
Set appWord = CreateObject("Word.Application"
appWord.Visible = True
Set currDoc = appWord.Documents.Add()
but I don't know how to use epression.inserfile(filename) command. It keeps giving me an error.
End Sub