Can't save changes to appontment items - help

  • Thread starter Thread starter Mike Knee
  • Start date Start date
M

Mike Knee

I hope someone can help me - I am trying to make a small change to an
Outlook appointment item in VB .net but my change never gets saved back to
the appointment - can anyone tell me what I am doing wrong?, the code is
like this:
oCalItem.BillingInformation = "processed"
oCalItem.Save()


but next time I look at this calendar item Billing information is empty. The
only complication I can think of is that I am getting my collection of
calendar items from a find:

oCalItem = oItems.Find(strFilter)
While TypeName(oCalItem) <> "Nothing"
<lots of code>
..

oCalItem.BillingInformation = "processed"
oCalItem.Save()
..
..
oCalItem = oItems.FindNext
End While


Many Thanks for any help!

Mike Knee
 
You might try dereferencing the object variable before reusing it:

oCalItem.BillingInformation = "processed"
oCalItem.Save()
Set oCalItem = Nothing
oCalItem = oItems.FindNext

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
Back
Top