|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
How do you send an email assigned by a category
I am posting this msg for a friend. and he it is for web but it's coded in VbScript so I tought may be it was the place cause it's seems there is no place for vbscript. And I don't know the answer so !
!He is able to send an email to any one in the contacts. But he would like to only send the email to people in a specificy category. How can he do it ? here is the code that he have now. Code:
Sub EnvoyerMail()
Dim myOutlookApli
Dim mynamespace
Dim mycontent
strOutput = Message
Set myOutlookApli = CreateObject("Outlook.Application")
Set mynamespace = myOutlookApli.GetNamespace("MAPI")
//Set mycontent = myOutlookApli.Createitem(0)
//mycontent.To = Courriel
//mycontent.Subject ="Wow."
//mycontent.HTMLBody = strOutput
//mycontent.Send
//.Folders("LesTest")
Set fldFolder = mynamespace.Folders("Boîte aux lettres - Sylvain Caron").Folders("Contacts")
For Each objItem In fldFolder.Items
on error resume next
msgBox "i:"&objItem
if objItem = "LesTest" then
msgBox "wow"
for Each objItem2 in objItem.items
msgBox "WOw:"& objItem2.Email1Address
next
end if
Set mycontent = myOutlookApli.Createitem(0)
mycontent.To = objItem.Email1Address
mycontent.Subject ="Wow."
mycontent.HTMLBody = "TEST"
<!--"<table width='600' border='1' cellspacing='0' cellpadding='0' align='center'><tr><td><img SRC=http://Proxynt/Maintenance/imageGifCarteNoël/CarteNoelFrancais1.gif></td></tr></table>"-->
mycontent.Send
i = i + 1
Next
End Sub
__________________
|
|
#2
|
|||
|
|||
|
I think It is code by vb..Not vbscript..
|
|
#3
|
|||
|
|||
|
Quote:
yeah here it is a forum about vb and not vbscript but the 2 are kinda similar in some place. And there is no place for vbscript. And in HTML and JavaScript they don't know either so I tought may be more people would know here, dunno. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Visual Basic Programming > How do you send an email assigned by a category |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|