View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
donwb donwb is offline
external usenet poster
 
Posts: 81
Default extract data from Outlook

I use Win XP and Office 2003
I am using a routine to extract information from Outlook and use it in
Excel.
There are a number of lines of code to define the various Outlook elements,
then this:-

<<Set objContact = olJournalFolder.Items.Find("[ContactNames] =
""Singer""")
<<myItem = objContact.Display

which works fine, but the following gives the error:- Type Mismatch or the
value"MyDate" in the condition is not valid.

Set objDate = olJournalFolder.Items.Find("[Start] = MyDate")

(MyDate is a variable in the Format dd mm yyyy, which is the same format as
the 'Start' dates in the Outlook Journal.)

I think it must be a wrong syntax or date format, as I expected
"ContactNames" and "Start" to be treated the same in the .Find statement.

Guidance would be welcome
donwb