I've added MS Excel Objects and it now works and opens the file, but only if specifically run rather than automatically. My code is currently as follows:
Code:
PrivateSub runOnOpen
Call openExcel
Call UpdateAllFields
End Sub
Sub openExcel()
Dim excelApp As Excel.Application
Dim openExcel As Workbook
Dim var1 As Integer
Set excelApp = New Excel.Application
Set openExcel = excelApp.Workbooks.Open("filename")
excelApp.Visible = True
End Sub
Sub UpdateAllFields()
Application.DisplayAlerts = False
ActiveDocument.Fields.Update
Application.DisplayAlerts = True
End Sub