I am trying to open a word document and paste a report from an excel sheet using vba but i keep getting the error message "compile error: user-defined type not defined"
What am I doing wrong? Please help
What am I doing wrong? Please help
Code:
Sub OpenWord()
Dim appWD As Word.Application
On Error Resume Next
Set appWD = CreateObject("Word.Application")
appWD.Documents.Add
End Sub