MapiContact.Load
Contents
[
Hide
]Load(string)
Loads a MapiContact from the specified file.
public static MapiContact Load(string filePath)
| Parameter | Type | Description |
|---|---|---|
| filePath | String | The path to the file to be loaded. |
Return Value
Returns a MapiContact instance loaded from the specified file.
Exceptions
| exception | condition |
|---|---|
| ArgumentException | filePath is null or empty. |
| FileNotFoundException | The specified file does not exist. |
| InvalidOperationException | The file holds neither a contact item nor a vCard. |
Remarks
Accepts both formats Save can produce: an Outlook MSG file holding a contact item, and a vCard file (read as FromVCard would). This makes MapiContact.Load(path) the inverse of contact.Save(path), which writes vCard by default.
See Also
- class MapiContact
- namespace Aspose.Email.Mapi
- assembly Aspose.Email
Load(Stream)
Loads a MapiContact from the specified stream.
public static MapiContact Load(Stream stream)
| Parameter | Type | Description |
|---|---|---|
| stream | Stream | The stream to be loaded. |
Return Value
Returns a MapiContact instance loaded from the specified stream.
Exceptions
| exception | condition |
|---|---|
| ArgumentNullException | stream is null. |
| NotSupportedException | stream does not support reading. |
| InvalidOperationException | The stream holds neither a contact item nor a vCard. |
Remarks
Accepts both formats Save can produce: an Outlook MSG file holding a contact item, and a vCard file (read as FromVCard would). This makes MapiContact.Load(path) the inverse of contact.Save(path), which writes vCard by default.
The stream is read from its beginning, whatever its current position.
See Also
- class MapiContact
- namespace Aspose.Email.Mapi
- assembly Aspose.Email