The Community is hosting an End of Summer sweepstakes! Participants must complete tasks to earn tickets that will enter them with a chance to win a free year of Constant Contact and other great prizes!*
*No Purchase Necessary. For Official Rules, visit here. Constant Contact’s End of Summer 2020 Sweepstakes ends on October, 20, 2020 at 11:50 PM EST.

Error adding new contact

Occasional Contributor

Error adding new contact

I am adding a new contact and adding it to an existing list. I get an error on adding the contact list to the contact. I've followed lots of examples from the forum but still get "Object not set to an instance of an object." Any idea what I'm doing wrong?


        Dim newc As New Contact
        newc.EmailAddress = ""
        newc.OptInSource = ContactOptSource.ActionByCustomer

        Dim list As New ContactOptInList
        list.ContactList = New ContactList("1")


Regular Advisor

Re: Error adding new contact



Thanks for posting!  This is a good one.  If the error does occur when you try to add list to newc, and not when you're setting the other two attributes, the collection musn't be initializing properly somehow.  I would suggest you take a peek at the wrapper source and make sure ContactLists is initializing properly. I would also recommend taking a look at our newer wrapper located on github here:


We'll gladly support issues with the v1 wrapper, but we try to focus on the v2 wrapper.  If you have further questions, please let us know.




Andrew B.

Constant Contact

API Support



Occasional Contributor

Re: Error adding new contact

Thanks. Actually, I decided the same thing. I switched completely over to the new v2 api and have everything working except a possible bug in the GetCampaignTrackingClicks. Waiting for an answer to a separate post on that. The new api is much easier to use. Very nice.

Developer Portal

View API documentation, code samples, get your API key.

Visit Page

Constant Contact 2020 End of Summer Community Sweepstakes!

The Constant Contact User Community is hosting a sweepstakes. The more you participate, the more chances you have to win! Read on to learn more...

Read More