Property

Method

Event

 

 

GetFileList

Gets the names of the files included in the current document.

Syntax

    HRESULT GetFileList(
    long type,
    VARIANT* pList
    );

Parameters

type

[in] Type of the files to include.

0

All

1

Local files

2

Remote files

pList

[in, out] Names of the included files (SafeArray BSTR type).

Return Values

0 (always)

Remarks

The size of the array for pList should be greater than or equal to the number of files you get from the GetFileNum method. If the array is smaller, the names are not allocated into the array.

Sample Codes

VBScript

    dim object
    dim array1()
    dim n
    Set object = document.editForm
    n = object.Wec.GetFileNum(0)
    MsgBox n
    if n = 0 then
    exit Function
    end if
    Redim array1(n-1)
    object.wec.GetFileList 0, array1
    for i=0 to n-1
    MsgBox array1(i)
    next

See Also

GetFileNum