Compile error

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
 
K

Ken Slovak - [MVP - Outlook]

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top