I am receiving a run-time error '13' Type mismatch when running this code. rst is a subform which lists the full file path of all documents to be printed in field "WIPath".
Dim rst As DAO.Recordset
Dim wordapp As Object
Dim WordDoc As Object
Set wordapp = CreateObject("Word.Application")
Set rst = Me.WorkOrder_sf1!WIPATH
rst.MoveFirst
Do While rst.EOF = False
Set WordDoc = wordapp.Documents.Open(rst)
WordDoc.PrintOut
WordDoc.Close (False)
rst.MoveNext
Loop
Set wordapp = Nothing
Set WordDoc = Nothing