다음을 통해 공유


GetVCardStream Method

Topic Last Modified: 2006-06-13

Returns the Microsoft® ActiveX® Data Objects (ADO) Stream object containing vCard stream information about the contact.

Applies To

IPerson Interface

Type Library

Microsoft CDO for Exchange 2000 Library

DLL Implemented In

CDOEX.DLL

Syntax

Function GetVCardStream() As ADODB.Stream
HRESULT GetVCardStream
(
        _Stream** Stream
);

Parameters

  • Stream
    If the method succeeds, then on return, the address passed holds a reference to the _Stream interface.

Return Value

Returns S_OK if successful, or an error value otherwise.

Remarks

Use the GetvCardStream method to share contact information with other personal information manager (PIM) or contact applications that can parse vCard content.

Example


Dim oPer As New CDO.Person
Dim strm As New ADODB.Stream

'assume strURL is a valid URL to a person contact item
oPer.DataSource.Open strURL

'you can set the ADO Stream object to the returned vCard stream
Set strm = oPer.GetvCardStream

'save the stream to a file
strm.SaveToFile "d:\vcard.txt", adSaveCreateOverwrite

'Use the Stream methods off GetvCardStream directly
oPer.GetvCardStream.SaveToFile "d:\vcard.txt", _
adSaveCreateOverwrite