ITextStoryRanges::_NewEnum method

Retrieves an IEnumVARIANT enumerator interface for this collection of stories.

Syntax


HRESULT _NewEnum(
  IUnknown **ppunkEnum
);

Parameters

ppunkEnum

Type: IUnknown**

The pointer to the enumerator interface.

Return value

Type: HRESULT

If the method succeeds, it returns S_OK. If the method fails, it returns one of the following error codes. For more information about COM error codes, see Error Handling in COM.

Return codeDescription
E_INVALIDARG

ppunkEnum is null.

E_FAIL

Failure for some other reason.

 

Remarks

This definition together with the implementation of IEnumVARIANT, enables one to support the following Microsoft Visual Basic for Applications (VBA) code.


    Dim t As ITextDocument
    Dim c As ITextStoryRanges
    Dim r As ITextRange

    Set t = gObj
    Set c = t.StoryRanges

    For Each r In c
        Debug.Print r.Text
    Next

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Tom.h

DLL

Msftedit.dll

See also

Reference
ITextStoryRanges
Conceptual
Text Object Model

 

 

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.