SaveAs Method

Saves a document with a new filename, optional file format, and compression level.

expression.SaveAs(FileName, FileFormat, CompLevel)

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

FileName    Required String. The folder and filename for the document. If no folder is specified, the document is saved in the current folder.

MiFILE_FORMAT

FileFormat can be one of the following MiFILE_FORMAT constants.
miFILE_FORMAT_DEFAULTVALUE (-1)
miFILE_FORMAT_TIFF (1)
miFILE_FORMAT_TIFF_LOSSLESS (2)
miFILE_FORMAT_MDI (4)

MiCOMP_LEVEL

CompLevel can be one of the following MiCOMP_LEVEL constants.
miCOMP_LEVEL_LOW (0)
miCOMP_LEVEL_MEDIUM (1)
miCOMP_LEVEL_HIGH (2)

Remarks

Call the SaveAs method after creating a new document to assign a file name, file format, and compression level to the new document, or to save a document using a different file format or compression level. After the SaveAs method is used, use the Save method to save changes to the document.

Example

The following example creates a new document from an existing .TIF file and saves the new document as an .MDI file, using medium compression (the default).

Sub TestSaveAs()
  
  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