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-2018 by Barry MacDonnell. All Rights Reserved.

Page updated Aug 24, 2107

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.08; 08/24/17; 35,272 bytes)

Compatible with WordPerfect 9 and later versions

Downloading, Documentation, Modifications, and Support

Purpose
Album.wcm is a 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 (search in sub-folders, specify the number of photos, their size, captions, page format, etc.).

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

•  The images in the new document are actual images -- i.e., copies, not links to the originals. You can then select and copy them into any other document, if desired.
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.

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. (Thanks go to 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


•  Download and extract the Album.wcm macro from the ZIP file and place it in your Default or Supplemental macro folder (see left sidebar for instructions if you need them). Then -

[1] Open a new, blank document and play the macro (Tools, Macro, Play).

[2] From the pop up menu that appears, select both the location of the images to use and their filename extension (e.g., *.jpg).

[3] Enable or disable any other options, as desired.

[4] Then click OK.



Notes


¤  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.)

¤  The alphabetical 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 sort order option to see which works best for your particular setup, and set the default menu choice below. (If you want more technical information, see the comment at the end of this 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.

•  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 (or use Tools, Macro, Edit), make the changes, and click the Save & Compile button on the macro toolbar.

•  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.

•  To set the size of individual images (e.g., the height and width) already inserted in your document, see here.

•  In some earlier 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.

¤  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.

Page Top