O
outside123
What is the trick to added a outlook contact to a public folder? Below
is sample of the code I am trying to work with any ideas?
Dim ol As New Outlook.Application
Dim olns As Outlook.NameSpace
Dim cf As Outlook.MAPIFolder
Dim c As Outlook.ContactItem
Set ol = New Outlook.Application
Set olns = ol.GetNamespace("MAPI")
Set cf = olns.Folders("Public Folders").Folders("All Public
Folders").Folders("Contacts").Folders("ParagonTest")
With rst
..MoveFirst
' Loop through the Microsoft Access records.
Do While Not .EOF
' Create a new Contact item.
Set c = ol.CreateItem(olContactItem)
c.MessageClass = "IPM.Contact.Porini"
If ![tblSQLDATA.Name] <> "" Then c.CompanyName =
![tblSQLDATA.Name]
If ![tblSQLDATA.CONTACT] <> "" Then c.FullName = "Tony"
c.Save
..MoveNext
Loop
End With
is sample of the code I am trying to work with any ideas?
Dim ol As New Outlook.Application
Dim olns As Outlook.NameSpace
Dim cf As Outlook.MAPIFolder
Dim c As Outlook.ContactItem
Set ol = New Outlook.Application
Set olns = ol.GetNamespace("MAPI")
Set cf = olns.Folders("Public Folders").Folders("All Public
Folders").Folders("Contacts").Folders("ParagonTest")
With rst
..MoveFirst
' Loop through the Microsoft Access records.
Do While Not .EOF
' Create a new Contact item.
Set c = ol.CreateItem(olContactItem)
c.MessageClass = "IPM.Contact.Porini"
If ![tblSQLDATA.Name] <> "" Then c.CompanyName =
![tblSQLDATA.Name]
If ![tblSQLDATA.CONTACT] <> "" Then c.FullName = "Tony"
c.Save
..MoveNext
Loop
End With