automatic send email with task

C

Catherine

i made a a custom task form that send an email at due
the problem is that i dont know how to use the text input to the "to " field and the "cc" field , in the script ( lines in red)
other question: how i put controls for chosing ( browsing) atachmments

Sub Item_PropertyChange(ByVal Name)
Select Case Name
Case "Status"
if Item.Status = 2 then '2 = Completed
Set NewItem = Application.CreateItem(0)
NewItem.To = Item.UserProperties.Find("_RecipientControl1")
NewItem.cc = Item.UserProperties.Find("_RecipientControl2")
NewItem.Subject = Item.UserProperties.Find("psubject")
NewItem.Body =Item.UserProperties.Find("pmessage")
' NewItem.attachments.add("c:\boot.ini")
NewItem.send
End IF
End Select
End Sub


thank you in advance
 
C

Catherine

the answer is at microsoft.public.office.developer.outlook.forms
i made a a custom task form that send an email at due
the problem is that i dont know how to use the text input to the "to " field and the "cc" field , in the script ( lines in red)
other question: how i put controls for chosing ( browsing) atachmments

Sub Item_PropertyChange(ByVal Name)
Select Case Name
Case "Status"
if Item.Status = 2 then '2 = Completed
Set NewItem = Application.CreateItem(0)
NewItem.To = Item.UserProperties.Find("_RecipientControl1")
NewItem.cc = Item.UserProperties.Find("_RecipientControl2")
NewItem.Subject = Item.UserProperties.Find("psubject")
NewItem.Body =Item.UserProperties.Find("pmessage")
' NewItem.attachments.add("c:\boot.ini")
NewItem.send
End IF
End Select
End Sub


thank you in advance
 

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