Home | Tips | Library | Other Authors | Other WP Sites | Writer's Links | Contact | Site Map | Donate

Barry MacDonnell's
Toolbox for WordPerfect

Macros, tips, and templates for Corel® WordPerfect® for Windows®
© Copyright 1996-2017 by Barry MacDonnell. All Rights Reserved.

Page updated Feb 18, 2015
ALBUM - Insert a group of photos or other graphic images from your disk or digital camera into a WordPerfect document
Insert 2 per page, 4 per page, or the maximum allowed per page (depending on the default size)

Download ALBUM.ZIP (v1.07; 02/18/15; 32,458 bytes)

Compatible with WordPerfect 9 and later versions

Downloading, Documentation, Modifications, and Support

This is a WordPerfect 9 (and later version) macro that

(1) inserts all photos or other graphic images of
(2) a user-specified type (e.g., JPG) found in
(3) a user-specified folder into
(4) a new, blank document in
(5) 2-, 4-, or more images per page format.

A menu (screen shot) gives several options (the number of photos, their size, captions, page format, etc.).

Small red arrow This macro is a "work in progress." The layout choices of the inserted images are based on the author's preferences, and may not suit your needs. That said, your suggestions for improvements are welcome.

Small red arrow For a sample of the macro's output using some Corel JPG photos, click here.

Small red arrow Macro writers may be interested in the way the macro gets a list of all the specified images in a folder/directory, and then sorts their filenames alphabetically before inserting them. This is done with the FileFind and SortArray macro commands, which may be useful in your own work. (The author thanks J. Dan Broadhead, developer of the PerfectScript core macro language, for many of the code segments used to perform these operations.]

Instructions, notes, and tips

  • You must select both the location of the images and their filename extension (e.g., *.jpg) in the menu that appears when you play the macro. If the macro cannot find any images of the specified type it will display an error message and exit, so you should "point" the macro to the correct drive, folder, and filename extension type before pressing "OK" on the menu. (Note that you can also type the filename extension -- e.g., *.png -- into the file type field, as well as pick it from the list using the field's down arrow.)
    • You can set the menu's default values -- including your preferred folder location -- in the redlined "User Modification Area" in the macro's code. Just open the macro like any other WordPerfect document, make the changes, and click the Save & Compile button on the macro toolbar.
  • Early versions of WordPerfect: The first time you play the macro or edit it, you might get a warning message about the SortArray command being obsolete. It was marked obsolete by Corel (and they later removed such error messages); however, this command works just fine -- which appears to be true of most, if not all, so-called "obsolete" macro commands. Just press "Continue Compilation" if you get this warning message.
    • Warnings about obsolete commands were implemented by Corel in WP9/sp4. But even though many commands have been named 'obsolete' by Corel since very early WP versions — probably with a view toward consistency and conservation of code overhead — most still work, and probably will work in versions to come.
  • The order of files in the source directory/folder may be different than expected due to the way Windows stores files. Hence, you have a choice of "ascending" or "descending" order on the menu. Try each to see which works best for your particular setup, and set the default menu choice in the User Modification Area of the macro's code. (If you want more technical information, see the comment at the end of the macro about FileFind, SortArray, etc.)
  • If some images are rotated (e.g., flipped upside down), you can select the image (right-mouse click), then choose Image Tools to flip the image.
  • Early versions of WordPerfect: If you have not installed all graphic converters when you installed WordPerfect, you may not be able to insert the images. Do a custom install to include them if necessary.
  • To set the size of individual images (e.g., the height and width) already inserted in your document, see here.

Tip for digital camera users

Since the images can be on any drive, you may be able to import them directly from your digital camera if your operating system recognizes the camera's storage medium as a removable disk drive. Note that this macro only reads (i.e., inserts) the images into the current document. It does not write over any existing images inside your camera or on your hard drive, nor does it erase the originals.

For example, the author has a Nikon Coolpix 775, and in Windows XPHome the camera's CompactFlash memory shows up in Windows Explorer as drive E. So the path to all the in-camera photos for that specific system and camera would be E:\DCIM\100NIKON\*.JPG.

Just hook up the camera to the computer, turn the camera on, and open Windows Explorer or My Computer. See if it "sees" the camera as a new drive. If so, you should be able to select the drive and path to the directory/folder in the camera that contains your photos.

Related camera tips

When you click the menu drop list ("Location of images") to specify the camera's storage location, you may have to refresh (F5, or View>Refresh) the folder list in the Select Folder dialog. The camera's drive letter should then appear in the tree, usually labeled "Removable disk." Also, you can toggle the list view On/Off with View>List or with the toolbar button. This lets you see the filenames (thus, the eligible file types) in the selected directory/folder before processing.

Page Top