Hi,
I've been asked if its possible to write a macro to insert a revision table based on the sheet size (A4, A3, or A2), and populate the first line with the description "FIRST ISSUE" I have three table templates that the user currently manually selects depending upon the sheet size. They all snap to the upper-right table anchor and we use triangles as the revision symbol border but Revision A doesn't need a triangle. The tables are populated top down in ascending order with the column title at the top:
ZONE | REV. | DESCRIPTION | DATE | AUTH |
---|---|---|---|---|
A | FIRST ISSUE | /date | /initials | |
B | ||||
C |
Would it be too much to ask for someone to help me out in writing a simple macro that checks the sheet size, applies the appropriate template and inserts the table with the above text?
Thanks.
To start out, you would have to know the sheet size. This may help.
From there, you would have to select your template and apply it.
Note, this code is from a separate c# program but it should translate okay with a bit of syntax change
Then you will add your revision table based on the page size as well
Note, this is also code from a c# program. mCustomDrawingRevisionTable is my path to the table template file
Finally, you can add your first row with the following command
The data can be added with
Hopefully this gets you on the right track with what you want to do.