Append Example VB

This example demonstrates how to append 3 image pages to a file.

Private Sub cmdAppend_Click()
    Dim strOrigFile, strAppendFile As String
    Dim lngPgCount As Long 
    'This is the displayed image to which we are appending.
    ImgAdmin1.Image = "D:\image2\original.tif" 
    'Because we are using the dialog box to pick the file for append,
    'we need to save the original file.
    strOrigFile = ImgAdmin1.Image 
    ImgAdmin1.DialogTitle = "Select the file to be appended to the 
        displayed image"
    ImgAdmin1.ShowFileDialog OpenDlg
    strAppendFile = ImgAdmin1.Image 
    'Restore the original filename to the Image property because
    'the property must contain the destination file name.
    ImgAdmin1.Image = strOrigFile 
    'Append 3 pages starting with page 1.
    ImgAdmin1.Append strAppendFile, 1, 3 
End Sub