Enum FileAsMapping

FileAsMapping enumeration

Specifies how to generate and recompute the value of the FileAs property when other contact name properties change.

public enum FileAsMapping : long

Values

NameValueDescription
Empty0Empty value. No file-as mapping is applied.
DisplayName12289DisplayName. Uses the contact’s display name as the file-as value.
FirstName14854GivenName. Uses the first name as the file-as value.
LastName14865Surname. Uses the last name as the file-as value.
Organization14870CompanyName. Uses the organization or company name as the file-as value.
FirstMiddleLastGen14854GivenName MiddleName Surname Generation. Files under first name with middle name and suffix.
LastFirstMiddle32791Surname, GivenName MiddleName. Files under last name with first and middle name.
LastFirstMiddle232816SurnameGivenName MiddleName. Files under last name without comma, with middle name.
LastFirstMiddle332817Surname GivenName MiddleName. Files under last name with space, with middle name.
OrgLastFirstMiddle32792CompanyName\r\nSurname, GivenName MiddleName. Files under company name, then name.
OrgLastFirstMiddle232818CompanyName\r\nSurnameGivenName MiddleName. Files under company name, then last name without comma.
OrgLastFirstMiddle332819CompanyName\r\nSurname GivenName MiddleName. Files under company name, then last name with space.
LastFirstMiddleOrg32793Surname, GivenName MiddleName\r\nCompanyName. Files under name, then company name.
LastFirstMiddleOrg232820SurnameGivenName MiddleName\r\nCompanyName. Files under last name without comma, then company.
LastFirstMiddleOrg332821Surname GivenName PidTagMiddleName\r\nCompanyName. Files under last name with space, then company.
LastFirstMiddleGen32822Surname GivenName MiddleName Generation. Files under last name with full name and suffix.
LastFirstMiddleGen232824SurnameGivenName MiddleName Generation. Files under last name without comma, with full name and suffix.
BestMatch4294967293Specifies that, when displaying the contact, the application should attempt to use the current value of dispidFileUnder and other contact properties to find a “best match” for dispidFileUnderId.
AccordingToLocale4294967294Specifies that, when displaying the contact, the application should choose the appropriate default values (according to the language locale) for dispidFileUnderId and update dispidFileUnder to match the choice.
None4294967295Specifies that FileUnder is user-provided and should not be changed when another contact name property changes. I.e. value of FileUnder is not constructed from other properties.

Remarks

This enumeration defines the mapping rules for generating the FileAs property value based on other contact name properties. The FileAs property is used by contact management applications to determine how to sort and display contacts.

The values correspond to MS-OXPROPS revision 16.2 from 7/31/2014 and include various combinations of first name, last name, company name, and generational suffixes.

Use FileAsMapping to specify the rule for automatically generating the FileAs value.

Examples

[C#]

var contact = new Contact();
contact.GivenName = "John";
contact.Surname = "Doe";
contact.CompanyName = "Contoso Ltd";

// Automatically generate FileAs based on company name, then name
contact.FileAsMapping = FileAsMapping.OrgLastFirstMiddle;

// FileAs will be: "Contoso Ltd\nDoe, John"

See Also