filtering outlook messages

C

CenoFaag

Hello,

I tried to transfer outlook messages to a Access2003 table, using
Redemption.
As a reference date I use a the general datetimeformat (like 04-04-2010
14:29:11) and I try to filter the outlookmessages with
...items.Restrict("[ReceivedTime]>" & Dateref
Compiling the procedure, with the above mentioned argument, raises the error
"Not able to analyse the criterium 14" .
It seems that the timeinformation is not recognized.
When I use a short date, like 04-04-2010, the criterium is recognized.
But I need the date and time criterium.
What can I do?

Thanks for your reply.
Anton
 
M

Marco Pagliero

    ...items.Restrict("[ReceivedTime]>" & Dateref
Compiling the procedure, with the above mentioned argument, raises
the error "Not able to analyse the criterium 14" .
I'm missing the closing parenthesis:
items.Restrict("[ReceivedTime]>" & Dateref )
 
C

CenoFaag

Marco, thanks for your reply.
I did forget to write the closing parenthesis.
Without this ommission the error is raised.

With post declared as outlook.item and objFolder as Outlook.MAPIFolder the
instruction is:
Set post = objFolder.Items.Restrict("[ReceivedTime] >" & Datref)
The property ReceivedTime seems not able to resolve the time-part in
filtering a group. However, for an individual outlookmessage this property
returns the general date format.
What can be wrong?

"Marco Pagliero" <[email protected]> schreef in bericht
...items.Restrict("[ReceivedTime]>" & Dateref
Compiling the procedure, with the above mentioned argument, raises
the error "Not able to analyse the criterium 14" .
I'm missing the closing parenthesis:
items.Restrict("[ReceivedTime]>" & Dateref )
 
M

Marco Pagliero

Marco, thanks for your reply.
I did forget to write the closing parenthesis.
Without this ommission the error is raised.

With post declared as outlook.item and objFolder as Outlook.MAPIFolder the
instruction is:
Set post = objFolder.Items.Restrict("[ReceivedTime] >" & Datref)
The property ReceivedTime seems not able to resolve the time-part in
filtering a group. However, for an individual outlookmessage this property
returns the general date format.
What can be wrong?
Another thing: can be that Datref needs quotes (apostrophe) if it
contains blanks?

Set post = objFolder.Items.Restrict("[ReceivedTime] >'" & Datref &
"'")

I find somewhere
Set mItemCollection = mItemCollection.Restrict("[SentOn] > '" &
Format(dteStart, "yyyy-mm-dd hh:nn:ss") & "'"
and it puts apostrophes around it because of the blank between date
and time, I suppose.

Greetings
Marco P
 
C

CenoFaag

A more carefull inspection of the datetime information on an outlookmessage
revealed the ommission if the seconds. So when I entered the datetime as the
format(Dateref,"dd-mm-yyyy hh:mm" ), no errors were raised. The criterium
without the seconds-part is specific enough.
Problem solved.
Thanks for your assitance

Marco Pagliero said:
Marco, thanks for your reply.
I did forget to write the closing parenthesis.
Without this ommission the error is raised.

With post declared as outlook.item and objFolder as Outlook.MAPIFolder
the
instruction is:
Set post = objFolder.Items.Restrict("[ReceivedTime] >" & Datref)
The property ReceivedTime seems not able to resolve the time-part in
filtering a group. However, for an individual outlookmessage this
property
returns the general date format.
What can be wrong?
Another thing: can be that Datref needs quotes (apostrophe) if it
contains blanks?

Set post = objFolder.Items.Restrict("[ReceivedTime] >'" & Datref &
"'")

I find somewhere
Set mItemCollection = mItemCollection.Restrict("[SentOn] > '" &
Format(dteStart, "yyyy-mm-dd hh:nn:ss") & "'"
and it puts apostrophes around it because of the blank between date
and time, I suppose.

Greetings
Marco P
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top