Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Connect PB to outlook session using OLE

Status
Not open for further replies.

Foliveira

Programmer
Jan 30, 2003
1
BR
Hi,
I created a Appointment form in Outlook and put at default form of the Calendar folder items.
Now, I need to list the controls that i deployment of the Calendar folder items.
The following example show my code with the control named "numberofpeople" that i want to list :

OLEObject ole_outlook, ole_namespace, ole_folder

Long ll_max, ll_return
Integer ll_count, ll_ind
Datetime ldt_Start

ole_outlook = Create OLEObject

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

If ll_return <> 0 Then
Destroy ole_outlook
Return
End If

ole_namespace = ole_outlook.GetNameSpace(&quot;MAPI&quot;)

ole_folder = ole_namespace.GetDefaultFolder(9)

ll_max = ole_folder.Items.Count

messagebox(&quot;Total&quot;, string(ll_max))

For ll_count = 1 To ll_max

ldt_Start = ole_folder.Items(ll_count).Start

MessageBox( &quot;Subject: &quot;+String(ole_folder.Items(ll_count).Subject), + &
&quot;Body: &quot;+String(ole_folder.Items(ll_count).Body) + &
&quot;~nData: &quot; + String(ldt_Start))

IF Date(ldt_Start) < Date(Today()) THEN
Continue
END IF

ll_ind = ole_folder.Items(ll_count).numberofpeople
Next


Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top