PDA

View Full Version : Replace shape with Table



msadiqrajani
10-02-2010, 10:23 AM
Hello all

I have a documents with many shapes(rectangle) in each document.
Now I have to convert manually all to one row table...thats so time consuming and boring..

"I need it to convert into table....Converting it to text box won't work..I know how to do it..."

I am looking for some macro which automate this task.I just select a shape and run macro and it convert it to table..

I think trick of doing should be position of the shape..

please help...its urgent.

Thanks

Tinbendr
10-02-2010, 12:26 PM
Welcome to VBA Express!

See this link (http://word.mvps.org/faqs/customization/ReplaceAnywhere.htm).

The code at the bottom (of the link) is about replacing text in a shape, but you should be able to adapt it to your situation.

Capture the text, then delete the shape, then add the table.

Work backwards through the document, else you could get a "Object not found" error.

If you need further help, post a sample document.

msadiqrajani
10-02-2010, 12:29 PM
Thanks for reply..

I have approx done it my self..

Will share my code once completed...

macropod
10-02-2010, 08:36 PM
Hi Msadiqrajani,

I see you've posted the same query at:
http://www.mrexcel.com/forum/newreply.php?do=newreply&noquote=1&p=2463788

For cross-posting etiquette, please read:
http://www.excelguru.ca/node/7

msadiqrajani
10-03-2010, 04:52 AM
Hello macropod


Thanks for pointing me this point.Was not sure I would get a answer on mrexcel regarding Word,So Posted here too.. Sorry

A Big Sorry

macropod
10-03-2010, 03:45 PM
Hi Msadiqrajani,

It's OK to post in multiple forums, but you should also post a link to the other posts in every one of those forums. That's so people who usually only see posts in one forum don't waste time doing the same or similar work that's been done elsewhere and so that everyone knows what's been tried.