#1
|
|||
|
|||
macro to format this
Hi, Please see the attached document. Can someone please suggest how to write a macro to align the stars in table row in one go, rather than one by one. Lets say if I cut and paste the table from one location in word document to another location (within the same document), will I need to realign the stars. Is there a way that it can become part of table text. Regards Umesh Banga |
#2
|
||||
|
||||
Hi ubns,
You really don't need a macro for this. Once you've made all the stars the same size (eg 0.5cm*0.5cm), position the left & right ones where you want them in each cell (eg 0 and 3cm, respectively) then, for a given cell, select all the stars, set the top positioning to the same value (eg 0 from paragraph), then use the 'align' option to evenly distribute the stars horizontally. Once you're done, it might be a good idea to group the stars in each cell. Amongst other things, that makes it quite easy to copy & paste a set of stars to another location. Indeed, trying to have a macro locate and re-position the stars after they've already been inserted is problematic - far better to have a macro do the insertion, etc, from the outset.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
Hi,
I have tried doing it and thanks it sort of works. However, when copy paste it kind of moves from the centre of the position of cell. So as you advised in the previous post, is it possible to create a macro with these stars size and inserted in table. regards Umesh Banga |
#4
|
||||
|
||||
Hi Umesh,
As I said in my previous post, it is difficult for a macro to locate and reposition the stars after you have already inserted them. It would be easier (but not all that easy) to do the insertion by code. And before anyone could do any coding, full specifications would be required, including: • how many stars in each cell • how do you decide which stars are green and which stars are white? • how many rows are there? there are probably other things that would be needed, but the above are just for starters. As I said before, if you create and align a set of stars how you want them, then group them, it is then easy to copy, paste & reposition the group wherever you want them.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Macro to find text in between two characters and then format selected text? | qcom | Word | 5 | 02-19-2015 11:23 PM |
Need a macro to convert all graphics to GIF format | sleake | Word VBA | 3 | 02-10-2012 05:00 PM |
How do I assign a macro to a button when the macro is in my personal workbook? | foolios | Excel Programming | 2 | 07-27-2011 02:41 PM |
hover format | ldecola | Word | 0 | 03-09-2011 10:28 AM |
Format a Row | Eagle710 | Excel | 0 | 08-05-2009 08:57 AM |