Create Method

Creates a new document.

expression.Create(FileOpen)

*expression   * Required. An expression that returns a Document object.

FileOpen    Optional String. The path and filename of the optional document file that is to be loaded into the new document.

Remarks

The FileOpen argument accepts an .MDI or a .TIF file. If you do not supply the path, the Create method looks for the source file in the current folder. You can also create a new document without loading a source file, and add images to the new document from other open documents.

Example

The following example creates a new document from an existing .TIF file and saves the new document as an .MDI file.

Sub TestCreate()

  Dim miDoc As MODI.Document
  
  Set miDoc = New MODI.Document
  miDoc.Create "C:\document1.tif"
  
  miDoc.SaveAs "C:\document1.mdi", miFILE_FORMAT_MDI
  
  Set miDoc = Nothing

End Sub

Applies to | Document Object