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

Outlook find Method



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old May 2nd 07, 03:30 PM posted to microsoft.public.outlook.program_vba
Meex
external usenet poster
 
Posts: 6
Default Outlook find Method

Hi,

I use the Items.Find method to search for a certain item,
sometimes it happens that the mehtod returns something, but when
I try to call a method on the returned item, or try to read a
property I get an automatisation error, although the item is really
in the system. It's also not possible to catch the error, because the
returned items is not Nothing so this comparison with IS NOTHING
returns false, when I try IS NULL or = "", I get the automatisation
error?
What could be the cause, or how can I catch the error?

regards
Meex

Ads
  #2  
Old May 2nd 07, 05:48 PM posted to microsoft.public.outlook.program_vba
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default Outlook find Method

What is your code?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Meex" wrote in message
ups.com...
Hi,

I use the Items.Find method to search for a certain item,
sometimes it happens that the mehtod returns something, but when
I try to call a method on the returned item, or try to read a
property I get an automatisation error, although the item is really
in the system. It's also not possible to catch the error, because the
returned items is not Nothing so this comparison with IS NOTHING
returns false, when I try IS NULL or = "", I get the automatisation
error?
What could be the cause, or how can I catch the error?

regards
Meex



  #3  
Old May 3rd 07, 10:40 AM posted to microsoft.public.outlook.program_vba
Meex
external usenet poster
 
Posts: 6
Default Outlook find Method

Code:
For Each Data In et_act.Rows
'Suchen nach ob Termin bereits vorhanden
Set myAppointment = myFolderCal.Items.Find("[BillingInformation] =
'" & _
Data("VBELN") & "'")
'Termin nicht gefunden, neu erstellen
If myAppointment Is Nothing Then
Set myAppointment = m_olApp.CreateItem(olAppointmentItem)
Else 'Termin vorhanden
If Not myAppointment.IsRecurring Then 'ERROR OCCURES!!!
For i = 1 To myAppointment.Links.count
myAppointment.Links.Remove (1)
Next i
End If
End If
Next

regards
Meex


  #4  
Old May 3rd 07, 05:54 PM posted to microsoft.public.outlook.program_vba
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default Outlook find Method

How do you dim myAppointment? What would TypeName(myAppointment) return?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Meex" wrote in message
oups.com...
Code:
For Each Data In et_act.Rows
'Suchen nach ob Termin bereits vorhanden
Set myAppointment = myFolderCal.Items.Find("[BillingInformation] =
'" & _
Data("VBELN") & "'")
'Termin nicht gefunden, neu erstellen
If myAppointment Is Nothing Then
Set myAppointment = m_olApp.CreateItem(olAppointmentItem)
Else 'Termin vorhanden
If Not myAppointment.IsRecurring Then 'ERROR OCCURES!!!
For i = 1 To myAppointment.Links.count
myAppointment.Links.Remove (1)
Next i
End If
End If
Next

regards
Meex




  #5  
Old May 4th 07, 07:25 AM posted to microsoft.public.outlook.program_vba
Meex
external usenet poster
 
Posts: 6
Default Outlook find Method


Dim myAppointment As AppointmentItem

I'm sorry, but at the moment I have no reproducable case, so I'm not
able to run your mentioned statement

regards
Meex

 




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
Outlook Object Send Method Rob Outlook and VBA 1 March 17th 07 07:49 PM
Find Method wild card search? [email protected] Outlook and VBA 5 May 3rd 06 02:26 PM
hotmail/outlook 2003 error: 0x800CCC3D 'Unimplemented method' [email protected] Outlook - General Queries 5 April 26th 06 07:19 PM
Restrict Method DNW emanson Outlook and VBA 14 March 28th 06 05:47 AM
Best method for using Outlook out of the office Bob Outlook - General Queries 1 January 31st 06 03:05 AM


All times are GMT +1. The time now is 08:43 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2024 Outlook Banter.
The comments are property of their posters.