I have designed a "Russian Lotto" (Bingo-like) card with fancy borders and a 5 by 6 table (to contain random numbers. What I can't figure out is a way to AUTOMATICALLY place each one of those random numbers (in external .csv file) in one of the 30 table fields, CENTERED. It's a pain to drag n drop, then size, etc. I would happily pay for such a tool - can't find such a beast in GDG Macros or MacroMonster. Perhaps I'll have to resort to a long, complex recorded script. Thanks, fellow Forum members.
CorElder said:It's a pain to drag n drop, then size, etc.
I understand why you would want to automate the transfer of the text (numbers of empty strings for blank spaces) from an external source.
It should be straightforward, though, because all of the formatting - the typeface, the font size, the horizontal and vertical alignment - can already be in place on the table.
This is me just clcking and typing, clicking and typing, etc.
So, the macro only needs to get the text content from a file, and then push it into the Paragraph text shapes that make up the table. The access to table contents is sort of ugly, because a table is a custom shape, but it's not bad once one knows how to do it. Setting the value for the text of a table cell will look something like this:
Shape.Custom.cell(lngColumn, lngRow).TextShape.Text.Story = strCellText
If you give the table shape a specific name in your drawing, then the macro could easily know which shape to work on.
The beauty of doing it that way is that you could redesign your card, change the typeface and font size, change the color, etc. - and the exact same macro would still work for populating the text as long as the table has the same number of columns and rows.
Eskimo - I thought I was fairly knowledgeable in CorelDraw (my versions go back about 20 years), but I can see you are more advanced. Thanks so much for the (prompt) help. ..CorElder