f$Word: Save document (as)
f$Word: Save document (as)
Save a copy of an active document. Calling this function is necessary if Word throws the error: ’Formatting too complex’. Saving a copy can provide a solution for such cases.
This function can also be used to save the active document with different name or file type.
Syntax: | Status = f$Word('Save document','File name','Type') | ||
| Argument | Type | Meaning |
| Save document | String | Keyword |
| File name | String | Name of the document with file extension and path information. If '' is given as file name, the file name of the function f$Word :Document will be used. |
| Type | String | File type to be used, when saving with a different type: '' - save in current format '0' – save as Word document '3' – save as formatted text with breaks 4' – save as DOS text '5' – save as DOS text with line breaks '6' – save as RTF '7' – save as Unicode text '8' – save as HTML |
Result: | Integer | 0: Command successfully executed -1: The document of intent cannot be saved. | |
Example: | Status = f$Word('Save document','c:\\temp\\offer.rtf,'6') | ||