Do I need to Delete temporary ContactItem objects?

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!
 
S

Sue Mosher [MVP-Outlook]

Since you never opened it, you shouldn't need to close it. Just set it to
Nothing.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top