ScheduleForFile

The ScheduleForFile method returns a Schedule object when a schedule file name is specified.

Applies To

Application object

Syntax

objApplication.ScheduleForFile (FileName, OpenMode, Password, FileOpenFlags)

Parameters

FileName
Required. Specifies the name of the schedule file to open.
OpenMode
Optional. Specifies the mode in which to open the schedule.
Password
Optional. Specifies the password needed to gain access to the file.
FileOpenFlags
Optional. Specifies the mode in which to open the file.

Returns

Schedule object

Remarks

If the schedule file being opened has a password, it should be specified when attempting to open the file. Passing an incorrect password will return an error.

Note Passing an empty password (zero-length string), will match a nonexistent schedule password. If the password parameter is omitted, access to the schedule file will depend on the access permission granted to the logged-on user by the schedule file. For archives and backup schedule files, only a default access permission, read minimal, will be granted.

Note The ScheduleForFile method does not accept named arguments.

The OpenMode parameter can have the following values.

Value Description
1 Never creates an object.
2 Creates a new schedule file, even if it already exists.
3 Creates a new schedule file only if the object does not exist.

The FileOpenFlags parameter can have the following values.

Value Description
1 Read-only.
2 Write.
4 Denies others read access.
8 Denies others write access.
32 Creates (if needed) and opens the file for read and write access.
64 Always creates and opens the file for read and write access.

See Also

ScheduleForUser