A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

recipients from a MAPITABLE



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old November 29th 07, 03:29 PM posted to microsoft.public.outlook.program_vba
Stèphan Eizinga
external usenet poster
 
Posts: 2
Default recipients from a MAPITABLE

Hello,

I want to collect the recipients from a mail message.

We use this SQL query in MAPITable.ExecSQL "SELECT
Recipients,Body,SenderEmailType,SenderEmailAddress FROM Folder"

If this QUERY is correct, how can I get the items from Recipients?

I use the latest Outlook Redemption v. 4.4 and PowerBuilder 11.1

- BEGIN POWERBUILDER CODE -
loo_ADOrecordset = io_folder.Items.MAPITable.ExecSQL('SELECT
Recipients,Body,SenderEmailType,SenderEmailAddress FROM Folder')

DO WHILE (loo_ADOrecordset.EOF = FALSE)
// How can I read this out?
st_recipients = loo_ADOrecordset.Fields.Item("Recipients").Value
// Working correct!
st_sendermail =
loo_ADOrecordset.Fields.Item("SenderEmailAddress") .Value

loo_ADOrecordset.MoveNext()
LOOP
- END POWERBUILDER CODE -

King regards,
Stèphan Eizinga
  #2  
Old November 29th 07, 05:03 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default recipients from a MAPITABLE

Recipients is a collection, not a property. You need to get the actual
message and retrieve and iterate the Recipients collection for what you
want. Get the EntryID of the item in question and use that to get the email
object and then retrieve and iterate the Recipients collection.

The same would apply to any other collection such as Attachments.

If you just want whatever is in the To, Cc and Bcc fields you can use those
string properties but those may not be what you want. They could return
display names or email addresses or a mix of both for any one recipient and
for a received email the Bcc field will always be blank of course.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Stèphan Eizinga" wrote in message
...
Hello,

I want to collect the recipients from a mail message.

We use this SQL query in MAPITable.ExecSQL "SELECT
Recipients,Body,SenderEmailType,SenderEmailAddress FROM Folder"

If this QUERY is correct, how can I get the items from Recipients?

I use the latest Outlook Redemption v. 4.4 and PowerBuilder 11.1

- BEGIN POWERBUILDER CODE -
loo_ADOrecordset = io_folder.Items.MAPITable.ExecSQL('SELECT
Recipients,Body,SenderEmailType,SenderEmailAddress FROM Folder')

DO WHILE (loo_ADOrecordset.EOF = FALSE)
// How can I read this out?
st_recipients = loo_ADOrecordset.Fields.Item("Recipients").Value
// Working correct!
st_sendermail =
loo_ADOrecordset.Fields.Item("SenderEmailAddress") .Value

loo_ADOrecordset.MoveNext()
LOOP
- END POWERBUILDER CODE -

King regards,
Stèphan Eizinga

  #3  
Old November 29th 07, 06:28 PM posted to microsoft.public.outlook.program_vba
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default recipients from a MAPITABLE

In addition to what Ken said, also keep in mind that even though recipient
and attachment data cannot be directly retrieved from a table, you can still
create restrictions based on recipients and attachments (the WHERE clause).

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Ken Slovak - [MVP - Outlook]" wrote in message
...
Recipients is a collection, not a property. You need to get the actual
message and retrieve and iterate the Recipients collection for what you
want. Get the EntryID of the item in question and use that to get the
email object and then retrieve and iterate the Recipients collection.

The same would apply to any other collection such as Attachments.

If you just want whatever is in the To, Cc and Bcc fields you can use
those string properties but those may not be what you want. They could
return display names or email addresses or a mix of both for any one
recipient and for a received email the Bcc field will always be blank of
course.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Stèphan Eizinga" wrote in message
...
Hello,

I want to collect the recipients from a mail message.

We use this SQL query in MAPITable.ExecSQL "SELECT
Recipients,Body,SenderEmailType,SenderEmailAddress FROM Folder"

If this QUERY is correct, how can I get the items from Recipients?

I use the latest Outlook Redemption v. 4.4 and PowerBuilder 11.1

- BEGIN POWERBUILDER CODE -
loo_ADOrecordset = io_folder.Items.MAPITable.ExecSQL('SELECT
Recipients,Body,SenderEmailType,SenderEmailAddress FROM Folder')

DO WHILE (loo_ADOrecordset.EOF = FALSE)
// How can I read this out?
st_recipients = loo_ADOrecordset.Fields.Item("Recipients").Value
// Working correct!
st_sendermail =
loo_ADOrecordset.Fields.Item("SenderEmailAddress") .Value

loo_ADOrecordset.MoveNext()
LOOP
- END POWERBUILDER CODE -

King regards,
Stèphan Eizinga



 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Redemption MAPITable Question Patrick Pirtle Outlook and VBA 8 November 20th 07 05:45 AM
SQL filters with MAPITABLE DENNIS BROWN Outlook and VBA 1 July 21st 07 10:50 PM
How do I get a propertyvalue from a mapitable [email protected] Outlook and VBA 1 October 4th 06 07:51 PM
Redemption - MapiTable : BusyStatus Tadwick Outlook and VBA 4 August 10th 06 07:36 PM
Redemption MAPITable Dmitry Streblechenko Add-ins for Outlook 1 January 12th 06 05:09 AM


All times are GMT +1. The time now is 03:04 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.