Yes, you're correct on all those statements. I've not only closed Outlook
but also rebooted.
There are some other addins (our pinpointtools applications) in the Trust
Center but none of those use VBA code.
Could there be some problem with the code I copied? I saw the other posts
about this newsgroup inserting a CRLF and splitting the line -- I fixed that
and got it to save/compile correctly, but maybe there's something else off.
Here's my code, copied from my ThisOutlookSession. This is the line that I
had to fix:
*** If Not objItem.UserProperties("TemporaryParentEntryId") Is Nothing
Then ***
Option Explicit
Private WithEvents olInspectors As Outlook.Inspectors
Private Sub Application_Startup()
Dim olApp As New Outlook.Application
Set olInspectors = olApp.Inspectors
End Sub
Private Sub olInspectors_NewInspector(ByVal pInspector As Outlook.Inspector)
Dim olApp As Outlook.Application
Dim objNS As Outlook.NameSpace
Dim objItem As Object
Dim strID As String
Dim bcmContact As Outlook.ContactItem
Set olApp = CreateObject("Outlook.Application")
Set objNS = olApp.GetNamespace("MAPI")
Set objItem = pInspector.CurrentItem
If objItem.Class = olTask Or olAppointment Then
If Not objItem.UserProperties("TemporaryParentEntryId") Is Nothing
Then
strID = objItem.UserProperties("TemporaryParentEntryId")
Set bcmContact = objNS.GetItemFromID(strID)
objItem.Links.Add bcmContact
End If
End If
Set bcmContact = Nothing
Set objItem = Nothing
Set objNS = Nothing
Set olApp = Nothing
End Sub
Private Sub Application_Quit()
Set olInspectors = Nothing
End Sub
Thanks for all your help on this. The BCM Community is thrilled to see you
here and as soon as we get this working, I'll ask you to expand it to show
the Phone Number of that Business Contact in the views. That will satisfy
another 200 people here.
Take care,
Lon
___________________________________________________________
Lon Orenstein
pinpointtools, llc
(e-mail address removed)
Author of Outlook 2007 Business Contact Manager For Dummies
Author of the eBook: Moving from ACT! to Business Contact Manager
800.238.0560 x6104 Toll Free (U.S. only) +1 214.905.0401 x6104
www.pinpointtools.com
Okay, I get it now. So the BCM link is working, but the native Outlook
Contacts link that we are trying to create with the vba is not working.
[quoted text clipped - 121 lines]