thanks for your answer...
I have a nother one.
I used the folowing code (some from you and some from someone else) to send
my plain form...
at the send command it gives you a message box that email was send and you
can close the original mail.
Is there any way to close it automaticly??
thanks
amir
=========== the code I used =========
Function Item_Send()
Dim objMsg ' As Outlook.MailItem
Dim objRecip ' As Outlook.Recipient
Dim objNewRecip ' As Outlook.Recipient
Const olMailItem = 0
Const olFormatPlain = 1
On Error Resume Next
Item_Send = False
Set objMsg = Application.CreateItem(olMailItem)
For Each objRecip In Item.Recipients
Set objNewRecip = _
objMsg.Recipients.Add(objRecip.address)
If objNewRecip.Resolve Then
objNewRecip.Type = objRecip.Type
End If
Next
If Item.Attachments.Count > 0 Then
' Add CopyAtts function from
'
http://www.outlookcode.com/d/code/copyatts.htm
' to this script.
Call CopyAtts(Item, objMsg)
End If
With objMsg
Set objControls = Item.GetInspector.ModifiedFormPages("Message").Controls
Set line1 = objControls("HebFName")
strBody = strBody & vbCrLf & " Hebrew First Name: " & line1
set line2 = objControls("Heb.lName")
strBody = strBody & vbCrLf & " Hebrew Last Name: " & line2
set line3 = objControls("Eng.fName")
strBody = strBody & vbCrLf & " English First Name: " & line3
set line4 = objControls("Eng.lName")
strBody = strBody & vbCrLf & " English Last Name: " & line4
set line5 = objControls("JobTitle")
strBody = strBody & vbCrLf & " Job Title: " & line5
set line6 = objControls("telnum")
strBody = strBody & vbCrLf & " Phone: " & line6
set line7 = objControls("dirmanager")
strBody = strBody & vbCrLf & " Direct Manager: " & line7
set line8 = objControls("pernotes")
strBody = strBody & vbCrLf & " Notes: " & line8
.BodyFormat = olFormatPlain
.Body = strBody
.DeferredDeliveryTime = Item.DeferredDeliveryTime
.DeleteAfterSubmit = Item.DeleteAfterSubmit
.ExpiryTime = Item.ExpiryTime
.Importance = Item.Importance
.OriginatorDeliveryReportRequested = _
Item.OriginatorDeliveryReportRequested
.ReadReceiptRequested = _
Item.ReadReceiptRequested
.Subject = Item.Subject
If .Recipients.count > 0 _
And .Recipients.ResolveAll Then
.Send
MsgBox "Message sent successfully. " & _
"You can close the original now."
Else
.Display
End If
End With
Set objMsg = Nothing
Set objRecip = Nothing
Set objNewRecip = Nothing
End Function
========== end of code ==============