MapiContact.Save

Save(string)

Saves the contact to a vCard 2.1 file.

public void Save(string filePath)
ParameterTypeDescription
filePathStringThe path of the file to write.

Exceptions

exceptioncondition
ArgumentExceptionfilePath is null or empty.

See Also


Save(string, ContactSaveFormat)

Saves the contact to a file in the specified format with the default options.

public void Save(string filePath, ContactSaveFormat saveFormat)
ParameterTypeDescription
filePathStringThe path of the file to write.
saveFormatContactSaveFormatThe format: vCard (the default), WebDAV or MSG.

Exceptions

exceptioncondition
ArgumentExceptionfilePath is null or empty.
NotSupportedExceptionsaveFormat is not supported.

See Also


Save(string, ContactSaveOptions)

Saves the contact to a file with the specified options.

public void Save(string filePath, ContactSaveOptions saveOptions)
ParameterTypeDescription
filePathStringThe path of the file to write.
saveOptionsContactSaveOptionsThe options; their class selects the format: VCardSaveOptions, WebDavContactSaveOptions or MapiContactSaveOptions.

Exceptions

exceptioncondition
ArgumentExceptionfilePath is null or empty.
ArgumentNullExceptionsaveOptions is null.
NotSupportedExceptionThe vCard version in saveOptions is not supported.

See Also


Save(Stream)

Saves the contact to a stream in vCard 2.1 format.

public void Save(Stream stream)
ParameterTypeDescription
streamStreamThe stream to write to.

Exceptions

exceptioncondition
ArgumentNullExceptionstream is null.
NotSupportedExceptionstream does not support writing.

See Also


Save(Stream, ContactSaveFormat)

Saves the contact to a stream in the specified format with the default options.

public void Save(Stream stream, ContactSaveFormat saveFormat)
ParameterTypeDescription
streamStreamThe stream to write to.
saveFormatContactSaveFormatThe format: vCard (the default), WebDAV or MSG.

Exceptions

exceptioncondition
ArgumentNullExceptionstream is null.
NotSupportedExceptionstream does not support writing.
NotSupportedExceptionsaveFormat is not supported.

See Also


Save(Stream, ContactSaveOptions)

Saves the contact to a stream with the specified options.

public void Save(Stream stream, ContactSaveOptions saveOptions)
ParameterTypeDescription
streamStreamThe stream to write to.
saveOptionsContactSaveOptionsThe options; their class selects the format: VCardSaveOptions, WebDavContactSaveOptions or MapiContactSaveOptions.

Exceptions

exceptioncondition
ArgumentNullExceptionstream or saveOptions is null.
NotSupportedExceptionstream does not support writing.
ArgumentExceptionThe format of saveOptions does not match its class.
NotSupportedExceptionThe vCard version in saveOptions is not supported.

See Also