Saves the document on a disk with a new name and, optionally, a new file type may be chosen.
&WordDocument.SaveAs(FileName [ , FileType [ , DOSText [ , LineBreaks ] ] ] )
Where:
FileName
New name of the Word document.
FileType
New file type to be generated from the Word document.
Valid file types are:
DOC |
Word format |
RTF |
Rich Text Format |
HTM |
HyperText Markup/ HyperText Markup Language |
DOT |
DOC Template |
TXT (Text)
This parameter is optional. The default file type is DOC.
DOSText
If TXT type is specified, it is possible to specify whether the format of the text to be used will be DOS (1) or not (0). This parameter is optional. The default value is 0.
LineBreaks
If TXT type is specified, it indicates whether a line break will be added at the end of each line (1) or not (0). This parameter is optional. The default value is 0.
Type Returned:
Numeric
Extended data types:WordDocument Data Type
Generators: .NET, Java,
Ruby (up to GeneXus X Evolution 3),
Visual FoxPro (up to GeneXus X Evolution 3)
Note: This method returns an error code, so it is possible to call it as a function (&Err = &WordDocument.SaveAs(…..)).
Save Method for excel document and word document extended data types
WordDocument Data Type