[dba-Tech] Access to Outlook question

Susan Harkins ssharkins at gmail.com
Sun Nov 11 17:41:13 CST 2007


In the following code, the Set itm = itms.Add("IMP.Contact") statement returns an object variable not set error. The Outlook library is referenced. Any help?

Susan H. 



  Dim itms As Outlook.Items
  Dim itm As Outlook.ContactItem
  Set cnn = CurrentProject.Connection
  rst.Open "tblContacts", cnn

  Set itm = itms.Add("IMP.Contact")
  
  With itm
    .CustomerID = Nz(rst!CustomerID)
    .FirstName = Nz(rst!FirstName)
    .LastName = Nz(rst!LastName)
    .Department = Nz(rst!Department)
    .Birthday = Nz(rst!Department)
  End With


More information about the dba-Tech mailing list