Compile error

  • Thread starter Thread starter hpoincare
  • Start date Start date
H

hpoincare

When I run this script, I get "compile error - Sub or Function is not
defined" and the "AddLine" is highlighted in the line: AddLine ("Repair
Item") & _



Sub cmdSendPlain_Click()
Dim strDetails
Dim strBody
Dim objForward
On Error Resume Next
strDetails = Item.Body
Item.BodyFormat = 1
strBody = AddLine("Repair Item") & _
AddLine("Description") & _
AddLine("Equipment Location") & _
AddLine("Contact Name") & _
AddLine("Contact Phone")
If strDetails <> "" Then
strBody = strBody & vbCrLf & strDetails
End If
Set objForward = Item.Forward
objForward.Body = strBody
Err.Clear
objForward.Send
If Err = 0 Then
m_blnUserSent = True
MsgBox "Request has been sent. ", , "Repair Request"
Else
MsgBox "Request not sent. Error occurred. ", , "Repair Request"
End If
Set objForward = Nothing
End Sub
 
Obviously you need to create an AddLine Function to do whatever that
function is supposed to do. If you copied the code from somewhere you might
have missed the source for that function.
 
Back
Top