Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 8th, 2003, 12:47 PM
Watever Watever is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Montreal, Canada
Posts: 486 Watever User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 52 m 20 sec
Reputation Power: 6
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
__________________

Reply With Quote
  #2  
Old October 8th, 2003, 11:54 PM
cleverpig cleverpig is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jul 2003
Posts: 1,152 cleverpig User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via MSN to cleverpig
I think It is code by vb..Not vbscript..

Reply With Quote
  #3  
Old October 9th, 2003, 07:05 AM
Watever Watever is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Montreal, Canada
Posts: 486 Watever User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 52 m 20 sec
Reputation Power: 6
Quote:
Originally posted by cleverpig
I think It is code by vb..Not vbscript..


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.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming > How do you send an email assigned by a category


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
Stay green...Green IT