XLL+ Class Library (6.3)

CXlMacros::SaveAs

Equivalent to choosing the Save As command from the File menu

static int SaveAs(
   LPCTSTR document_text,
   short int type_num = 1,
   LPCTSTR prot_pwd = 0,
   short int backup = -1,
   LPCTSTR write_res_pwd = 0,
   short int read_only_rec = -1
);

Parameters

document_text

Document_text specifies the name of a workbook to save.

type_num

Type_num is a number specifying the file format in which to save the workbook.

prot_pwd

Prot_pwd is the password, as text, required to unprotect a protected file.

backup

Backup is a logical value corresponding to the Always Create Backup File check box in the Save Options dialog box. A value of -1 is treated as a missing argument, A value greater than 0 is treated as TRUE, and 0 is treated as FALSE.

write_res_pwd

Write_res_pwd is the password, as text, required to open a read-only file with full write privileges.

read_only_rec

Read_only_rec is a logical value corresponding to the Read-Only Recommended check box in the Save Options dialog box. A value of -1 is treated as a missing argument, A value greater than 0 is treated as TRUE, and 0 is treated as FALSE.

Return Value

Zero if the function has been called successfully; non-zero if the function could not be called. See Error codes for a list of return values.

Remarks

See the Microsoft Excel on-line Help for full details about this function.

Requirements

Header: xlfuncs.h

See Also

CXlMacros Class | CXlMacros Methods