Skip to Content
0
Former Member
Jun 29, 2015 at 07:12 AM

outlook olFolderCalender find subject

133 Views

Hi all

I will find a subject in the outlook calender. The connect to outlook works but I need help for this:

  • search a subject e.g. 'My Meeting in city'
  • start search from a certain date e.g. 06/29/2015

Who can help me for this.

This is my working code without search

Hope this code is ok!

l_result = ole_outlook.ConnectToNewObject("outlook.application")

ole_namespace = ole_outlook.GetNameSpace("MAPI")

ole_folder = ole_namespace.GetDefaultFolder( olFolderCalendar )

s_name = ole_folder.Name

l_return = ole_folder.items.Count

? dt_Start = ole_folder.Items(o).Start

? ole_folder.start = string( dti_start_datum, 'dd.mm.yyyy' )

for o = 1 to l_return

? l_result = ole_folder.Find("[Subject] = 'My Meeting in city'")

// s_subject = trim(String(ole_folder.Items(o).Subject))

// d_date = date(ole_folder.Items(o).start)

// d_start = datetime(ole_folder.Items(o).start)

// d_end = datetime(ole_folder.Items(o).end)

next

ole_outlook.DisconnectObject()

destroy ole_outlook

return

André Rust