Help

Table Of Contents
Creating scripts to automate tasks
F
ILEMAKER PRO HELP 434
An index (long integer) into the Documents collection.
NULL (which returns the entire collection).
Methods
Open(filename As String, accountName As String, password As String): Opens a specific
FileMaker
Pro file, creates a Document object, and returns a pointer to the Document object.
Close( ): Closes all documents in the collection and removes them from this collection. The
Document Close statement produces a hard close of the document. If other users are connected to
the FileMaker
Pro database when the application receives a Document Close statement, they will
be disconnected immediately, and without warning. Be sure to allow any connected users the
opportunity to exit FileMaker
Pro before sending this command.
Document
A Document is a FileMaker Pro database file.
Properties
Note All properties are read-only.
Application: Returns a pointer to the Application object.
Parent: Returns a pointer to the Document Collection object, the parent of the Document object.
FullName: Returns the file specification of the document, including the path. If the Document
FullName command is sent to a remote file running on a host, only the file’s name, and not its path,
will be returned.
Path: Returns the path specification of the document. This does not include the filename or the
extension.
Saved: Returns the state of the document (whether the document has been saved). FileMaker Pro
always returns TRUE.
Active: If the Document object’s window is active, then TRUE is returned, otherwise, FALSE.
Methods
Activate( ): Makes the window associated with this Document object the active window.
Save( ): Flushes the database cache.
Close( ): Closes the document and removes it from the Documents collection.
DoFMScript(WhichScript As String): Executes a FileMaker Pro script on this Document object. The
script is specified by name, and must already exist in the Document (for example, in the
FileMaker
Pro file).
Related topics
Using FileMaker Pro ActiveX Automation (Windows)
ActiveX Automation example (Windows)
ActiveX Automation example (Windows)
Private Sub Form_Load()
'----------------------------------------------