PDA

View Full Version : Center All Graphics



vklind
04-28-2006, 09:59 AM
I need a Word macro that will go through a document and center all graphic content. I've been able to find the graphics with:

Selection.Find.Text = "^g"

and I been able to center it with:

ParagraphFormat.Alignment = wdAlignParagraphCenter

but I am having trouble getting this to automate through a document and stop at the end (or begining).

Any good ideas out there?:banghead:

TonyJollans
04-28-2006, 10:33 AM
You can do it with a single "Replace All".

Hit Ctrl+H to get the Dialog

Find ^g
Replace (leave blank)

With the cursor in the Replace box, press Ctrl+E (to centre the paragaraph)

Hit Replace All

Record yourself doing it to get code - probably with a lot of superfluous bits :)

fumei
04-28-2006, 10:48 PM
Undoubtedly with superfluous bits.