--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54
"mscertified" <rup...@tigerlily.com> wrote in message news:31D9B4DC-950A-4CA6...@microsoft.com...
Dim olmyApp As Outlook.Application
Dim olmyNameSp As Outlook.NameSpace
Dim olmyFolders As Outlook.Folders
Dim olFolder As Outlook.MAPIFolder
Dim olHiCs As Outlook.Items
Dim olHiC As Outlook.ContactItem
'
Set olmyApp = CreateObject("Outlook.Application")
Set olmyNameSp = olmyApp.GetNamespace("MAPI")
Set olmyFolders = olmyNameSp.Folders
'
Set olFolder = olmyFolders("Public Folders").Folders("All Public Folders"). _
Folders("Hawaii").Folders("Hawaii Contacts")
Set olHiCs = olFolder.Items
' Read Outlook folder and update Client table
For i = 1 To olHiCs.Count
If olHiCs.Item(i).Class = olContact Then 'Process the item if it is a
contact
Set olHiC = olHiCs.Item(i)
.......
.Fields("Email").Value = olHiC.Email1Address '<=== Triggers warning
.......
End If
Next
Yes, that is correct for versions before Outlook 2007. You would need to recode using the Redemption library (highly recommended) or use one of the utilities that bypasses the prompts.
Since you are using public folders, you could also consider using WebDAV to communicate directly with the Exchange server, rather than going through Outlook. Exchange documentation starts at http://msdn.microsoft.com/exchange/ with discussions in the microsoft.public.exchange.development newsgroup or on the Web at http://forums.microsoft.com/TechNet/ShowForum.aspx?ForumID=838&SiteID=17 . This article introduces some basic concepts and provides links to other resources:
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54
"mscertified" <rup...@tigerlily.com> wrote in message news:EAB09571-4B5D-46C9...@microsoft.com...