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

Redemption MAPITable - how to deal with empty fields



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old December 20th 06, 12:14 PM posted to microsoft.public.outlook.program_vba
SummerSky
external usenet poster
 
Posts: 4
Default Redemption MAPITable - how to deal with empty fields

I'm working in Access 2003 with a Redemption MAPITable object to obtain a
subset of Exchange's GAL (Address Book). In the following code that I have
written for test purposes, whenever the retrieved field (e.g. 'PR_INITIALS')
is empty, the expression Row(x) contains a binary error code that I cannot
deal with. Any Ideas as to what to put in the function HandleEmpty, so that
HandleEmpty(Row(x)) returns a string?

......code snippet.....................
...
Rows = Table.GetRows(CHUNKSIZE)
If Not IsEmpty(Rows) Then
For i = LBound(Rows) To UBound(Rows)
Row = Rows(i)
Debug.Print (HandleEmpty(Row(0)) & vbTab &
HandleEmpty(Row(1)) & vbTab & HandleEmpty(Row(2)) & vbTab &
HandleEmpty(Row(3)) & vbTab & HandleEmpty(Row(4)))

Ads
  #2  
Old December 20th 06, 04:35 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Redemption MAPITable - how to deal with empty fields

Can you use the IsEmpty function on the row first and then on each column as
you read it? That's what I do.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"SummerSky" wrote in message
...
I'm working in Access 2003 with a Redemption MAPITable object to obtain a
subset of Exchange's GAL (Address Book). In the following code that I have
written for test purposes, whenever the retrieved field (e.g.
'PR_INITIALS')
is empty, the expression Row(x) contains a binary error code that I cannot
deal with. Any Ideas as to what to put in the function HandleEmpty, so
that
HandleEmpty(Row(x)) returns a string?

.....code snippet.....................
...
Rows = Table.GetRows(CHUNKSIZE)
If Not IsEmpty(Rows) Then
For i = LBound(Rows) To UBound(Rows)
Row = Rows(i)
Debug.Print (HandleEmpty(Row(0)) & vbTab &
HandleEmpty(Row(1)) & vbTab & HandleEmpty(Row(2)) & vbTab &
HandleEmpty(Row(3)) & vbTab & HandleEmpty(Row(4)))


  #3  
Old December 20th 06, 05:27 PM posted to microsoft.public.outlook.program_vba
SummerSky
external usenet poster
 
Posts: 4
Default Redemption MAPITable - how to deal with empty fields

I tried that. In my case, the function IsEmpty, when fed an error-inducing
Row(x) argument, returns false, because the Row(x) contains the infamous
MAPI_E_NOT_FOUND array of variants error, and thus is not an appropriate
discriminator.
I solved the issue the ugly but effective way by assigning every Row(x) to a
string variable. The type mismatch error that then occurs when a
MAPI_E_NOT_FOUND is assigned to the string variables, is ignored by the
subroutine by a nice "on error resume next" statement.

"Ken Slovak - [MVP - Outlook]" wrote:

Can you use the IsEmpty function on the row first and then on each column as
you read it? That's what I do.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"SummerSky" wrote in message
...
I'm working in Access 2003 with a Redemption MAPITable object to obtain a
subset of Exchange's GAL (Address Book). In the following code that I have
written for test purposes, whenever the retrieved field (e.g.
'PR_INITIALS')
is empty, the expression Row(x) contains a binary error code that I cannot
deal with. Any Ideas as to what to put in the function HandleEmpty, so
that
HandleEmpty(Row(x)) returns a string?

.....code snippet.....................
...
Rows = Table.GetRows(CHUNKSIZE)
If Not IsEmpty(Rows) Then
For i = LBound(Rows) To UBound(Rows)
Row = Rows(i)
Debug.Print (HandleEmpty(Row(0)) & vbTab &
HandleEmpty(Row(1)) & vbTab & HandleEmpty(Row(2)) & vbTab &
HandleEmpty(Row(3)) & vbTab & HandleEmpty(Row(4)))



 




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
no subject e mails, how do I deal with them? T5 Outlook - General Queries 8 November 25th 06 06:45 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
Help wanted Using redemption to see emails in CC,BCC and TO fields bobdydd Outlook and VBA 1 June 9th 06 11:11 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 11:32 AM.


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.