Do I need to Delete temporary ContactItem objects?

  • Thread starter Thread starter Tom Winter
  • Start date Start date
T

Tom Winter

I am using a temporary ContactItem object in order to parse a mailing
address into its parts. For example:

oContactItem = oOutlook.CreateItem(olContactItem)

oContactItem.BusinessAddress = sFullAddress

MsgBox "Parsed Postal Code:" & oContactItem.BusinessAddressPostalCode

Set oContactItem = Nothing

That is the only thing I want to use the ContactItem for. My question is,
should I use ".Delete" or maybe ".Close olDiscard" or is just setting my
variable to Nothing enough to get rid of the contact item? I don't want a
wierd looking contact to show up in the user's contacts folder. Thanks!
 
Since you never opened it, you shouldn't need to close it. Just set it to
Nothing.
 
Back
Top