The SaveToStorageFileAs method saves the information being held in the Package2 object and its subordinate objects and collections to a structured storage file. The new name and a new package ID are assigned.
object.SaveToStorageFileAs(
NewName,
[UNCFile],
[OwnerPassword],
[OperatorPassword],
[pVarPersistStgOfHost],
[bReusePasswords])
Part | Description |
---|---|
object | Expression that evaluates to a Package2 object |
NewName | A string specifying the new name for the package |
UNCFile | File specification to which package is to be written |
OwnerPassword | A string specifying the package owner password if the package is encrypted |
OperatorPassword | A string specifying the package user password if the package is encrypted |
pVarPersistStgOfHost | Screen layout information associated with a package (for internal use) |
bReusePasswords | A Boolean specifying whether to reuse package passwords |
New package ID and version ID values are generated when the package is saved, and the new name is assigned.
The default for bReusePasswords is True.
HRESULT SaveToStorageFileAs(
BSTR UNCFile,
BSTR OwnerPassword
BSTR OperatorPassword
VARIANT *pVarPersistStgOfHost
VARIANT_BOOL bReusePasswords );