|
Home | Tips | Library | Other Authors | Other WP Sites | Writer's Links | Contact | Site Map | Donate |
| Toolbox for WordPerfect |
||
|
Macros, tips, and
templates for Corel® WordPerfect® for Windows® |
Page updated Oct 28, 2020 | |
| ALBUM - Insert
a group of photos or other graphic images from your disk or digital device into a
WordPerfect document Insert 2 per page, 4 per page, or the maximum allowed per page (depending on the default size) |
||
|
Purpose
Album.wcm is a macro that - (1) inserts all photos
or graphic images of
(2) a user-specified file type (e.g., JPG, BMP, PNG, GIF, etc.) in (3) a user-specified folder into (4) a new, blank WordPerfect 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. Instructions First - Download and save the ALBUM.ZIP file and extract the Album.wcm
macro from inside it.
Place the macro in either your Default macro folder or the Supplemental macro folder, as shown in WordPerfect's Tools, Settings, Files, Merge/Macro. (◄-- If you are not familiar with this procedure see the left sidebar box for downloading instructions if you need them.)
Then - [1] Optional but recommended:
▸ Place copies
of all image files in a separate Windows folder for the purpose of playing
this macro. This is not necessary but it might you feel more
comfortable.
▸ Since the macro can only process one file type (e.g., JPG images) at a time, you might want to include only files of the same image types in that folder (and any sub-folders, if that menu option is used). This, too, is not necessary but it might help prevent confusion later about what the macro actually processed. [2] Open a new, blank document (File, New) and play the macro (Tools, Macro, Play). [3] From the pop up menu that appears, select both the location of the images for the macro to use and their file type (i.e., filename extension such as .jpg). [4] Enable or disable any other menu options, as desired. [5] Click OK. (Depending on the number of images this can take a little time since they must be copied into the document as .WPG images.) 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 on the macro's menu before
pressing "OK".
¤ 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.
Notes and tips • 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 menu's default choice (see next tip below). (Advanced users: If you want more technical information, see the comment at the end of this macro's code about FileFind, SortArray, etc.) • 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 that appears below the program's main (top) toolbar. • 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. • 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.
Such warnings about obsolete commands were implemented by Corel in WP9/sp4 (c.2000). 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. • To set the size of individual images (e.g., the height and width) already inserted in your document, see here. • Tip for macro writers: 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.]
|
|