|
|
Subject:
MS Word 97 Macro Needed
Category: Computers > Programming Asked by: google_maniac-ga List Price: $15.00 |
Posted:
10 Jan 2006 16:29 PST
Expires: 09 Feb 2006 16:29 PST Question ID: 431778 |
|
There is no answer at this time. |
|
Subject:
Re: MS Word 97 Macro Needed
From: manuka-ga on 10 Jan 2006 17:43 PST |
Don't know if you can get exactly what you want here, but we can come pretty close. The problem is that there doesn't seem to be any function to return the actual width in pixels of a given character or string or whatever. And relying on the number of digits won't work because different digits have different widths (depending on the font), and could potentially be in different point sizes etc. as well. So we can't just scan the cells and find the widest one, then adjust everything else to fit. What we can do is note the width of the column, then autofit it, check the new width, do some calculations and go from there. However, because we are relying on autofit, there are some limitations: - The cells will be sized and aligned according to the widest value in the whole column, not just your selection. We should still be able to limit the effects to the selected range - though it would probably be simpler to do the whole column. - If the table already occupies the full width of the text area, autofit will do nothing. I also suspect (but haven't checked) that if autofit would make the table extend beyond the text area, it will only go up to that limit. In either case, the problem is only an issue if your largest number is not being displayed on a single line. It sounds as if in general there will be extra space, so this shouldn't be a problem. |
Subject:
Re: MS Word 97 Macro Needed
From: tabspro-ga on 13 Jan 2006 11:35 PST |
This can be easily done with a few lines of VBA code .. The macro can be attached to a shortcut key or a button on the toolbar whenever you wnat to use it.. The code would first Take all the values in the tables in an array , convert them into numbers.... compare them... sort them into another temporary array ... convert each element of the array back into an string ... and write the whole string back to the table cells .. The only little complexity here could be in converting the string values like 120,200,000 into numbers ..coz there is no default function that can do it , it will have to be converted through a small custom function that would extract all the comma and then convert the no into string.. If you want I can do this for you for a little fee.. and even give you the source code with comments and instructions... |
Subject:
Re: MS Word 97 Macro Needed
From: google_maniac-ga on 15 Jan 2006 22:13 PST |
Can you give me an idea of how large a "fee" you are talking about? And what about the pronlem that the manuka-ga was refering too..the fact that different fonts have different point sizes...thanks.. |
Subject:
Re: MS Word 97 Macro Needed
From: nabzofsteel-ga on 20 Jan 2006 02:35 PST |
I have read what you want to do, Frankly it is too diffcult and a total waste of time...im guessin you are working at a publishing firm and you wanna make it easier to Copy and Paste...well i suggest you just copy and paste and stop finding ways to make this process easier. The more hours u spend doing it, the more money you make. think about it, plus Your manager at this publishing firm might know of what you are trying...=) |
Subject:
Re: MS Word 97 Macro Needed
From: google_maniac-ga on 31 Jan 2006 12:29 PST |
From the looks of it...you must be one of those "managers" at a publishing firm who believes that under production is the key to corporate america...I suggest that u start producing for the sake of ur fellow employees and for the sake of the united states' status as super power..its people like u who are responisble for the US's excessive need for out sourcing... |
If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you. |
Search Google Answers for |
Google Home - Answers FAQ - Terms of Service - Privacy Policy |