![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
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 |
Ads |
#2
|
|||
|
|||
![]()
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. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm "hpoincare" wrote in message ... 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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Compile error? | Cam | Outlook and VBA | 5 | April 23rd 08 02:43 PM |
Using Virtual PC to compile add-in question | Mike | Outlook and VBA | 1 | May 16th 07 04:25 PM |
Outlook.MAPIFolder: for each compile error | spareway | Add-ins for Outlook | 1 | January 29th 07 02:05 PM |
Project Won't Run or Compile | Ron | Outlook and VBA | 6 | January 23rd 07 02:24 AM |
What is: Compile Error in hidden module: AutoExecNew | Guitar125 | Outlook and VBA | 1 | July 7th 06 05:52 AM |