User Rino ( posted:

Don't know about reading the attachment, but this will get you a particular
message (in this case, any unread messages). This code is for OL97, but may
also work for OL2000.

Also, this is a link to OutLookExchange. It lists the OL97
objects, they also have a list of OL2000 objects:



Sub Main

'Declare variables
Dim objOutLook As Object
Dim objNameSpace As Object
Dim objFolder As Object
Dim objMailItem as Object
Dim intCounter as Integer

' Set the application object
Set objOutLook = CreateObject("Outlook.Application")

' Set the namespace object
Set objNameSpace = objOutLook.GetNamespace("MAPI")

' Set the folder (in this case 'Inbox')
Set objFolder = objNameSpace.Folders("Mailbox - Roger
SQAConsoleWrite "Total number of messages: " & objFolder.Items.Count
SQAConsoleWrite "---------------------------------------"

' Loop through all the messages in the Inbox
For intCounter = 1 to objFolder.Items.Count

'Create a mailitem object, using the counter
Set objMailItem = objFolder.Items(intCounter)

'If the mailitem has not been read yet...
If objMailItem.Unread = TRUE Then

'Write sender name, date, time, and subject
SQAConsoleWrite "Sender : " & objMailItem.SenderName
SQAConsoleWrite "Date Received: " &
SQAConsoleWrite "Time Received: " &
SQAConsoleWrite "Subject : " & objMailItem.Subject
'SQAConsoleWrite objMailItem.Body

End If

Next intCounter

'Unload objects from memory
Set objOutlook = Nothing
Set objNameSpace = Nothing
Set objFolder = Nothing

End Sub
<"Rochon, Stéphane"> wrote in
message news:103891@sqa-suite-users...

Anybody knows how to get the list of messages from Outlook Inbox and open an

I tried to access the control with Robot, It is a Supergrid control , Robot
recognize it as a generic control, I am not able to create a VP. My Object
Recognition Order option is set for C++. I tried using Outlook.Application
and MAPI objects but SQABasic does not support all methods and properties.


Stéphane Rochon
Senior Programmer Analyst, Database Administrator, Tool Smith
Land Software Engineering Centre (LSEC)