Share via


Copying a Profile

Applies to: Office 2010 | Outlook 2010 | Visual Studio

One way to create a profile is to copy from an existing profile and alter the necessary message services and service providers. Copying a profile involves using a profile administration object, provided by MAPI through the MAPIAdminProfiles function.

To copy a profile

  1. Call MAPIAdminProfiles to retrieve an IProfAdmin interface pointer.

  2. Call IProfAdmin::GetProfileTable to access the profile table.

  3. Build a property restriction with an SPropertyRestriction structure to match PR_DISPLAY_NAME (PidTagDisplayName) with the name of the profile to be copied.

  4. Call IMAPITable::FindRow to locate the appropriate row in the profile table.

  5. Call IProfAdmin::CopyProfile, passing the value of the PR_DISPLAY_NAME column as the lpszOldProfileName parameter.