BasicMaker Question

Talk about miscellaneous stuff that doesn't fit anywhere else. Off-topic discussions encouraged.
Post Reply
rdunham
Posts: 3
Joined: Wed Feb 18, 2009 5:14 am

BasicMaker Question

Post by rdunham »

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?
sven-l
SoftMaker Team
SoftMaker Team
Posts: 6251
Joined: Wed Apr 09, 2008 8:26 am
Location: Nuremberg
Contact:

Re: BasicMaker Question

Post by sven-l »

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.
Sven Leßmann
SoftMaker Software GmbH
rdunham
Posts: 3
Joined: Wed Feb 18, 2009 5:14 am

Re: BasicMaker Question

Post by rdunham »

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.
sven-l
SoftMaker Team
SoftMaker Team
Posts: 6251
Joined: Wed Apr 09, 2008 8:26 am
Location: Nuremberg
Contact:

Re: BasicMaker Question

Post by sven-l »

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
rdunham
Posts: 3
Joined: Wed Feb 18, 2009 5:14 am

Re: BasicMaker Question

Post by rdunham »

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.
sven-l
SoftMaker Team
SoftMaker Team
Posts: 6251
Joined: Wed Apr 09, 2008 8:26 am
Location: Nuremberg
Contact:

Re: BasicMaker Question

Post by sven-l »

rdunham wrote:That's discouraging. You might want to put that on the agenda for an update.
I've referred a feature request to our developers.
Sven Leßmann
SoftMaker Software GmbH
Post Reply

Return to “Water Cooler”