LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel reading user defined fields in Outlook

Hi,

I cannot seem to be able to access/dispay the content of a user defined
field on an Outlook contact form from within Excel VBA.

Any thoughts very much appreciated! Here is the code:

Sub Open_Outlook()
Dim MyProperty As Object
Dim MyFolder2 As Outlook.MAPIFolder
' Creates path to Outlook and to the Landlords Properties folder

Set ol = New Outlook.Application
Set olns = ol.GetNamespace("MAPI")
Set MyFolder1 = olns.GetDefaultFolder(olFolderContacts)
Set MyFolder2 = MyFolder1.Folders("Properties")
Set MyProperties = MyFolder2.Items
Set MyProperty = MyProperties.Find("[FullName] = ""D101""")
If MyProperty Is Nothing Then ' Find failed
MsgBox "Property Reference not found"
Else
MsgBox MyProperty.FullName
MsgBox MyProperty.UserProperties("LLsurname") ' This is the problem!!
End If
End Sub




 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
does Excel 07 allow User Defined functions? doc_grandma Excel Worksheet Functions 1 September 21st 09 11:16 PM
Excel Message "user defined type not defined" LEELK01 Excel Discussion (Misc queries) 2 August 14th 09 07:31 AM
Excel user defined functioned [email protected] Excel Worksheet Functions 2 March 28th 08 03:11 PM
"User-defined type not defined" message in Excel RW1946 Excel Discussion (Misc queries) 0 August 31st 05 12:14 PM
Excel user defined functions. Matt Excel Worksheet Functions 4 March 15th 05 07:22 PM


All times are GMT +1. The time now is 03:06 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"