This example shows how to make a copy of a file being inserted into a 1.x document.
void CAdmin1Dlg::OnFilelink()
{
// Request file being inserted into a document be copied
// to a new file in a location to be specified.
ImgAdmin1.SetForceFileLinking1x(FALSE);
// To specify location of the new files, use the
// FileStgLoc1x property.
ImgAdmin1.SetFileStgLoc1x("Image://srvrname\\new_images:");
// Second page of INSERTED DOC, will be inserted before page 3
// of ORIG DOC. Associated image files will be copied
// to new randomly generated file names in directory specified.
VARIANT evt;
evt.vt = VT_ERROR; // set to error for optional parameter
ImgAdmin1.SetImage("Image://srvrname\\doc_db:\\CAB\\DRAWER\\
FOLDER\\ORIG DOC");
ImgAdmin1.Insert("Image://srvrname\\doc_db:\\CAB\\DRAWER\\FOLDER\\
INSERTED DOC", 2, 3,1,evt,evt);
}