BasicMaker Question
BasicMaker Question
I didn't see a forum for BasicMaker so I'll post my problem here. I have written a script that opens a MS word document and performs some formating on the document. One part of the script deals with a table. I have been successful with setting an inputted row height as well as shading, borders and vertical centering. However, I would like to process the last 4 columns of the table to center the text horizontally in the cells. This has proved to be a very difficult task. There is no "HorizontalAlignment" as there is "VerticalAlignment " so I've tried many other ways. One thing I tried is to use SendKeys to send a CRL-E (SendKeys "^e", True) but it fails to work on this table. I have made it work on small "test" tables, but it doesn't work here. Anyone tell me how to have a BasicMaker script horizontal center text in a table cell?
Re: BasicMaker Question
Hello,
you can use
---
tm.activedocument.paragraphs(x).alignment = tmAlignParagraphCenter
---
where x is the paragraph index of the pgf inside the cell, starting from the top of the document.
you can use
---
tm.activedocument.paragraphs(x).alignment = tmAlignParagraphCenter
---
where x is the paragraph index of the pgf inside the cell, starting from the top of the document.
Sven Leßmann
SoftMaker Software GmbH
SoftMaker Software GmbH
Re: BasicMaker Question
Thank you for the reply. I have thought of this method, but how do I retrieve the paragraph number for the location when I am in the cell? I need that to put into the paragraph alignment expression.
Re: BasicMaker Question
Currently there's no function for that. Unfortunately you have to try different values and see where changes appear.
Sven Leßmann
SoftMaker Software GmbH
SoftMaker Software GmbH
Re: BasicMaker Question
That's discouraging. You might want to put that on the agenda for an update. The document has 163 paragraph marks and the table is about halfway through the document so that may be impractical. To bad a simple thing like horizontal centering of text in a cell would be so impossible to do. Two things to add to BasicMaker that would be helpful, 1) horizontal alignment for text in a table cell in TextMaker, 2) retrieval of the current paragraph index.
Thank you.
Thank you.
Re: BasicMaker Question
I've referred a feature request to our developers.rdunham wrote:That's discouraging. You might want to put that on the agenda for an update.
Sven Leßmann
SoftMaker Software GmbH
SoftMaker Software GmbH