Getting a run time object required error with this code (bolded below) and cannot figure out why! any help would be appreciated
My variables for the saved word document code have previously been declared.
Dim UserId As String
UserId = Sheets("QuantienEvaluations").Range("M5").Value2
Set WrdApp = CreateObject("Word.Application")
WrdApp.Visible = True
If Sheets("QuantienEvaluations").Range("A2") = "QuantienAerisOnly" Then Set WrdDoc = WrdApp.Documents.Open("C:\Users\" & UserId & "\Desktop\Quantien With Aries Only.docx")
If Sheets("QuantienEvaluations").Range("A2") = "QuantienAerisCertus" Then Set WrdDoc = WrdApp.Documents.Open("C:\Users\" & UserId & "\Desktop\Quantien With Aeris and Certus.docx")
WrdDoc.SaveAs2 Filename:= _
"C:\Users\" & UserId & "\Desktop\ " & CustomerName & " " & City & " " & State & " " & CustomerNumber & " " & "Quantien Evaluation Agreement" & " " & Month(Now()) & "." & Day(Now()) & "." & Year(Now()) & ".docx" _
, FileFormat:=13, LockComments:=False, _
Password:="", AddToRecentFiles:=True, WritePassword:="", _
ReadOnlyRecommended:=False, EmbedTrueTypeFonts:=False, _
SaveNativePictureFormat:=False, SaveFormsData:=False, SaveAsAOCELetter:= _
False, CompatibilityMode:=14
My variables for the saved word document code have previously been declared.
Dim UserId As String
UserId = Sheets("QuantienEvaluations").Range("M5").Value2
Set WrdApp = CreateObject("Word.Application")
WrdApp.Visible = True
If Sheets("QuantienEvaluations").Range("A2") = "QuantienAerisOnly" Then Set WrdDoc = WrdApp.Documents.Open("C:\Users\" & UserId & "\Desktop\Quantien With Aries Only.docx")
If Sheets("QuantienEvaluations").Range("A2") = "QuantienAerisCertus" Then Set WrdDoc = WrdApp.Documents.Open("C:\Users\" & UserId & "\Desktop\Quantien With Aeris and Certus.docx")
WrdDoc.SaveAs2 Filename:= _
"C:\Users\" & UserId & "\Desktop\ " & CustomerName & " " & City & " " & State & " " & CustomerNumber & " " & "Quantien Evaluation Agreement" & " " & Month(Now()) & "." & Day(Now()) & "." & Year(Now()) & ".docx" _
, FileFormat:=13, LockComments:=False, _
Password:="", AddToRecentFiles:=True, WritePassword:="", _
ReadOnlyRecommended:=False, EmbedTrueTypeFonts:=False, _
SaveNativePictureFormat:=False, SaveFormsData:=False, SaveAsAOCELetter:= _
False, CompatibilityMode:=14