in category
Search All
Tutorials
.Net
ASP
C/C++
ColdFusion
Delphi
DHTML
HTML
Java
Javascript
Perl
PHP
VBScript
Visual Basic
XML
Visual Basic
/
Outlook Samples
/ Reading Items In Inbox
Snippet details
ID:
414
Viewed:
1431
Added:
2002-08-19
Version:
User Rated at:
Rate This:
Select a rating...
5 .. Best
4
3 .. Average
2
1 .. Worst
Snippets in this catagory
Show Printable Version
obviously need outlook for this
Add the reference To the Outlook Object L
General Details
Snippet uploaded by:
snippet
Email :
webmaster@snippetlibrary.com
Snippet By:
Unknown
Snippet By:
Unknown
Declarations
Highlight All
none
Code
Highlight All
Dim myOLApp As New Outlook.Application Dim olNameSpace As Outlook.NameSpace Dim myItem As New Outlook.AppointmentItem Dim myRequest As New Outlook.MailItem Dim myFolder As Outlook.MAPIFolder Public myResponse Dim L As String Dim i As Integer Dim SearchSub As String Dim strSubject As String Dim myFolder As Outlook.MAPIFolder Dim strSender As String Dim strBody As String Dim olMapi As Object Dim strOwnerBox As String Dim sbOLApp Set myOLApp = CreateObject("Outlook.Application") Set olNameSpace = myOLApp.GetNamespace("MAPI") Set myFolder = olNameSpace.GetDefaultFolder(olFolderInbox) 'Dim mailfolder As Outlook.MAPIFolder Set olMapi = GetObject("", "Outlook.Application").GetNamespace("MAPI") For i = 1 To myFolder.Items.Count strSubject = myFolder.Items(i).Subject strBody = myFolder.Items(i).Body strSender = myFolder.Items(i).SenderName strOwnerBox = myFolder.Items(i).ReceivedByName ' Now Mail it to somebody Set sbOLAPp = CreateObject("Outlook.Application") Set myRequest = myOLApp.CreateItem(olMailItem) With myRequest .Subject = strSubject .Body = strBody .To = "anybody@anywhere.com" .Send End With Set sbOLAPp = Nothing Next Set myOLApp = Nothing Exit Sub
No Reviews to show
Please completely fill out the form below if you want to review this snippet. All reviews are subject to validation.
Subject:
Reviewed By:
Write a review:
Terms of Conditions
Powered By
© 2005
snippetlibrary.com
All Rights Reserved.