CreateNewDocument Method

CreateNewDocument Method

See Also                  Applies To

You can use the CreateNewDocument method to create a new document associated with a specified hyperlink.

Syntax

object.CreateNewDocument filename, editnow, overwrite

The CreateNewDocument method has the following arguments.

Argument Description
object The Hyperlink object within a control.
filename A string expression identifying the name and path of the document. The type of document format you want used can be determine by the extension used with the filename. to output the data. You can create HTML (*.htm), Microsoft Active Server Pages (*.asp), Microsoft Excel (*.xls), Microsoft IIS (*.htx, *.idc), MS-DOS Text (*.txt), Rich Text Format (*.rtf), or Microsoft Data Access Pages (*.html). Modules can be output only to MS-DOS text format. Data access pages can only be output in HTML format. Microsoft Internet Information Server and Microsoft Active Server formats are available only for tables, queries, and forms.
  Note   If an extension is not provided then the data access page format (.html) is assumed.

If a directory is not specfied, the default database directory is used. This directory is determined by the setting in Options dialog box.

editnow A Boolean value where True (-1) opens the document in design view and False stores the new document in the specified database directory. The default is True.
overwrite A Boolean value where True (-1) overwrites an existing document if the filename argument identifies an existing document and False requires that the filename argument specifies a new filename. The default is False.

Remarks

The CreateNewDocument method provides a way to programatically create a document associated with a hyperlink within a control.