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

Barry MacDonnell's
Toolbox for WordPerfect

 

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

Page updated June 7, 2008
ALBUM - Insert 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.05; 07/03/04; 32,804 bytes)

Compatible with WordPerfect 9 and later versions

Downloading, Documentation, Modifications, and Support

A WordPerfect 9+ macro that inserts all photos or other graphic images of a user-specified type found in a user-specified folder into a new, blank document. A menu gives several options (the number of photos, their size, captions, etc.).

Small red arrow This macro is a "work in progress." The layouts 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 and NOTES:

  • You must select 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.
    • 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.
  • The first time you play the macro or edit it, you may get a warning message about the SortArray command being obsolete. It was marked obsolete by Corel; however, this command seems to work just fine -- which appears to be true of most, if not all, "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.
  • 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.

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