PC Review


Reply
Thread Tools Rate Thread

Can't update or view custom fields

 
 
=?Utf-8?B?TFc=?=
Guest
Posts: n/a
 
      11th Nov 2004
In Outlook 2003 I'm not able to list, update, or view custom fields that I
have created using the userproperies.add method. The custom fields appear in
the "show fields" window in Outlook, but I can't access them in code. The
following is supposed to list all fields in the calendar folder, including
the custom fields; however, only the Outlook-defined fields show. What's
wrong with my code??

Public Sub viewfields()
Dim oolAppointmentItem As Outlook.AppointmentItem
Dim oolItemProperties As Outlook.ItemProperties
Dim oolItemProperty As Outlook.ItemProperty
Dim molcalendarfolder As Outlook.MAPIFolder
Set molcalendarfolder = pnspMAPI.GetDefaultFolder(olFolderCalendar)
For Each oolAppointmentItem In molcalendarfolder.Items
With oolAppointmentItem
Set oolItemProperties = .ItemProperties
For Each oolItemProperty In oolItemProperties
Debug.Print oolItemProperty.Name, oolItemProperty.Value
Next
End With
Stop
Next
End Sub
 
Reply With Quote
 
 
 
 
Sue Mosher [MVP-Outlook]
Guest
Posts: n/a
 
      11th Nov 2004
Defining properties in a folder does not assign them to individual items in
that folder. The individual items will not contain a custom property unless
either (a) a value has been set for the property or (b) the item was created
with a custom form that includes the property in question.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx


"LW" <(E-Mail Removed)> wrote in message
news:2FB583EE-B62E-4927-B971-(E-Mail Removed)...
> In Outlook 2003 I'm not able to list, update, or view custom fields that I
> have created using the userproperies.add method. The custom fields appear
> in
> the "show fields" window in Outlook, but I can't access them in code. The
> following is supposed to list all fields in the calendar folder, including
> the custom fields; however, only the Outlook-defined fields show. What's
> wrong with my code??
>
> Public Sub viewfields()
> Dim oolAppointmentItem As Outlook.AppointmentItem
> Dim oolItemProperties As Outlook.ItemProperties
> Dim oolItemProperty As Outlook.ItemProperty
> Dim molcalendarfolder As Outlook.MAPIFolder
> Set molcalendarfolder = pnspMAPI.GetDefaultFolder(olFolderCalendar)
> For Each oolAppointmentItem In molcalendarfolder.Items
> With oolAppointmentItem
> Set oolItemProperties = .ItemProperties
> For Each oolItemProperty In oolItemProperties
> Debug.Print oolItemProperty.Name, oolItemProperty.Value
> Next
> End With
> Stop
> Next
> End Sub



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using custom fields for better email list view. Me Microsoft Outlook Discussion 0 26th Feb 2010 08:56 AM
Custom fields in table view mtggal Microsoft Outlook Discussion 4 10th Jan 2008 06:38 PM
Can't view custom fields in shared tasks Dave Microsoft Outlook Discussion 0 31st Mar 2006 05:56 PM
custom fields in view =?Utf-8?B?R29sZkdhbA==?= Microsoft Outlook Discussion 0 15th Mar 2005 06:03 PM
Custom fields are not updated in a folder's view =?Utf-8?B?VmljdG9y?= Microsoft Outlook Form Programming 0 14th Feb 2004 01:46 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:44 PM.