User Defined Fields

  • Thread starter Thread starter JoeRob
  • Start date Start date
J

JoeRob

In "hacking about", I created several user defined fields which I would like
to remove. Under "all fields" they are listed under "User-Defined Field In
This Item", "User-Defined Fields In This Folder"and "Mens Club"(custome
form). How can I remove these fields.
 
On the All Fields page in the form design, you should see a Remove button on
the User-Defined Fields ... views. You may also want to go into the folder's
View dialog and remove the field definitions with the Remove button there.

Best practice is to do your "hacking about" in a test folder that you can
later delete.
 
Just to add to Sue's response:

#1 - If UDF's are exclusively part of the custom form
then you only need to remove them from the form definition
(unless the same fields were created in the folder prior to
the custom form being assigned)

#2 - If no custom form in play, removing the fields from the
"In folder" group will not remove the fields already assigned
to an individual item which occurs if there is a value in a
given UDF field. In those cases, if you want to completely
remove all traces of the UDF, you will need to remove
each UDF from each individual contact item where these
occur. (something that can be very easily done in bulk
via VBA)

Karl

--
____________________________________________________________
Karl Timmermans - The Claxton Group
ContactGenie - QuickPort/DataPort/Exporter/Toolkit/Duplicate Contact Mgr
"Contact import/export/data management tools for Outlook '2000/2010"
http://www.contactgenie.com
 
Sue, Thank you for your response. I slowly learning how to prevent these
mistakes.
Ref. your response, I'm sure it's obvious but what is "the folder's view
dialog"?
 
Karl,
What would the code to remove userdifined fields look like. Would this be
something using "userproperties.remove" and what would the expressions after
setting the object to a folder look like?
 
This quick snip should do the trick but there are lots of ways to do the
same thing. To stress, this should only be used for UDF's that are
NOT part of a custom form definition.

----------------------------------------------------------------------
Dim olItms As Outlook.Items
Dim olCItm As Outlook.ContactItem
Dim olUProp As Outlook.UserProperty

' assume olItms already set to selected ContactFolder.Items
For Each olCItm In olItms
'this skips everything other than contacts assigned to the
'standard contact message class
If olCItm.MessageClass <> "IPM.Contact" Then
GoTo Next_Con
End If
Set olUProp = olCItm.UserProperties.Find("PropName", True)

'this will skip the property if it doesn't exist for a given
contact
'UDF's should NEVER be deleted this way if a custom form
' is in use
If olUProp Is Nothing Then
'if checking for more than one UDF - adjust accordingly
GoTo Next_Con
End If
olUProp.Delete
olCItm.Save

Next_Con:
Next
-----------------------------------------------------------------------


Karl
--
____________________________________________________________
Karl Timmermans - The Claxton Group
ContactGenie - QuickPort/DataPort/Exporter/Toolkit/Duplicate Contact Mgr
"Contact import/export/data management tools for Outlook '2000/2010"
http://www.contactgenie.com
 
Back
Top