TMainForm.GetNewDoc Method

Returns a document instance.

Unit: fMainForm
function GetNewDoc(const FileName: string = ''): TDocumentAncestor

Parameters

FileName
Type: System.string

Overrides

_MainFormAncestor.T__MainFormAncestor.GetNewDoc

The FileName can be empty. Use it only to check the extension and if the file exists or not, but don't load it. It's done by the standard "File / Open" option. Depending on the file extension, returns the good TDocumentAncestor descendant.