Frames

R

rob

Hi All - Is there a way to delete all frames in a word
document at once? My scanner OCR's text into Word, but
puts it into multiple frames. Any ideas?
 
J

Jay Freedman

rob said:
Hi All - Is there a way to delete all frames in a word
document at once? My scanner OCR's text into Word, but
puts it into multiple frames. Any ideas?

Hi Rob,

This little macro will remove all the frames...

Sub ZapFrames()
ActiveDocument.Frames.Delete
End Sub

(See http://www.gmayor.com/installing_macro.htm if necessary.)

You may not be happy with the result, though. When the frame goes away, the
text that was in it gets deposited at the point where the frame's anchor
was. If that point is the beginning of the paragraph of regular text
immediately following the frame's position, all will be well -- but my
experience is that OCR programs tend to anchor all their frames at the top
left corner of the page. You could easily wind up with a lot of scrambled
eggs. :-(

Another possible complication is that the macro will delete only frames
whose anchors are in the main body of the document. If there are any frames
tucked into headers, footers, footnotes, or other "stories" (Word's term),
that will take a bit more effort.
 
R

Rob

Thank you very much for this answer. This may complicate
things but i'm not a programmer. Where would I plug in
this script? Any help would be appreciated.
 
R

Rob

Figured it out....Thanks!

-----Original Message-----
Thank you very much for this answer. This may complicate
things but i'm not a programmer. Where would I plug in
this script? Any help would be appreciated.

the
frame's anchor
.
 
Top