It is necessary to write a macro in the Visual Basic programming language to be used in the graphic program CorelDraw.
Brief description:
There is a catalog template with products in CorelDraw format
There is an Excel file with product data
There are images in 3 different folders
It is required to import data from the Excel file into the CorelDraw catalog template and place the corresponding images from the folders.
Detailed description of the catalog in CorelDraw:
Total number - 8 pages (sometimes there are 16 pages). Products are arranged in a grid with a height of 4 rows and a width of 3 or 4 rows. Products are divided into categories (frozen foods, culinary, grocery, chemicals, canned goods, etc.). The number of products is always different in different categories and in the catalog itself. On the front cover, there are always 6 products in a 3x3 grid. Product images are inserted using PowerClip. The names and prices of the products are on the right.
Detailed description of the Excel file:
There are fields: Product barcode, name, description, weight, price without discount, price with discount, discount percentage. Products are divided into categories according to the catalog in Corel Draw.
Detailed description of the images:
Images are named according to the barcode in the Excel file. Additionally, there is the name of the product. Images are located in 3 different folders.
Detailed description of the task: It is necessary to write a script or macro that will automate the layout work of the catalog. It should read fields from the Excel file and insert the name, description, weight, price without discount, price with discount, and discount percentage of the product into the Corel Draw catalog template. It should also separate products into their categories according to the Excel file when importing into the CorelDraw catalog. The macro should parse the 3 folders with images by the barcode from the Excel file and insert them into the CorelDraw template in a specific square using the PowerClip function. So that the names and images of the products correspond to each other.
Project nuances: Images in the 3 folders may be duplicated, so the script should take only one image, preferably in png if available, or of a larger size. Images are in different formats - jpg, png, tif, psd, jpeg, bmp. When importing into Corel Draw, the image must be inserted inside the square - the program has a function to insert into the Power Clip container. And adjust this image proportionally to the container. If the price is equal to or less than 20%, only the price with a discount is written; in other cases, when the discount is above 20%, all prices are written on the price tag. There are also products that need to be highlighted in yellow; these products are marked in the Excel file.