I have few MS word documents which contains text in text boxes. I want to remove those text boxes but keep the data as it. How can i do it ?
+2
A:
I think you can get hold of the text from inside the textboxes using something like ActiveDocument.Shapes(1).TextFrame.TextRange.Text and then you could delete it by doing something like ActiveDocument.Shapes(1).Delete, and after that you'd have to put the text you retrieved from the text box in the relevant part of the document.
ho1
2010-06-14 09:07:43
It seems that this will delete only the first text box ? and i have too many. in short on each page text is in a text box.
GS_Guy
2010-06-14 13:02:02
@Umar Siddique: Yes, you'd have to put it in some kind of loop, something like `foreach(Shape s in ActiveDocument.Shapes)' might work.
ho1
2010-06-14 13:07:49