Removing Text Blocks

J

jimahon

When I scan a document in Omnipage X it does a great job but creates a
text block for each title, heading and paragraph. Is there a way to
remove these text blocks? I recall doing it before but am unable to
remember how for the life of me.

Thanks in advance.

Monte
 
K

Klaus Linke

Hi Monte,

IIRC, OmniPage uses frames, and you need to get rid of them.
One difficulty is to not mess up the order in which the text appears.
I haven't needed OmniPage lately, but used the macro below in the past:
Hope it works for you.

Regards,
Klaus


While ActiveDocument.Frames.Count > 1
ActiveDocument.Frames(1).Range.Select
ActiveDocument.Frames(1).Delete
Selection.Cut
Selection.Find.ClearFormatting
With Selection.Find
.Text = "^b"
.Forward = True
.Wrap = wdFindStop
.Format = False
End With
If Selection.Find.Execute Then
Selection.Collapse (wdCollapseStart)
Selection.MoveWhile CSet:=Chr(13), Count:=wdBackward
Selection.InsertParagraph
Selection.Collapse (wdCollapseEnd)
Selection.Paste
Else
Selection.EndKey Unit:=wdStory
Selection.InsertParagraphAfter
Selection.Paste
End If
Wend
 
J

jimahon

Sounds easy enough. I really appreciate the tip I will try the macro
and let you know how I make out. Thanks again!

Monte
 
J

jimahon

No luck when I put the macro into Word 11.1 and try to complile it it
came up with a syntax error and I'm not familiar enough with visual
Basic to Debug it. When I compile it it highlights "
ActiveDocument.Frames(1).Range .Select" and saysCompile error: Syntax
error. :( Any suggestions.

Monte
 
J

jimahon

Okay I changed that line to read "
ActiveDocument.Frames(1).Range.Select" I run it and and it highligts
that line and says Syntax error. Any suggestions?

Monte
 
K

Klaus Linke

Hi Monte,

Sorry, then the macro doesn't seem to work for you. The text boxes aren't frames, obviously.

:-( Klaus
 
K

Klaus Linke

Okay I changed that line to read "
ActiveDocument.Frames(1).Range.Select" I run it and and it
highligts that line and says Syntax error. Any suggestions?


Hi Jim,

The macro ran fine on your document in Word2004... Not sure what went wrong.
It took much longer than in Winword (nearly 2 minutes instead of 2 seconds), though.

And it isn't really necessary for your file. The macro was more for text in columns or tables, where it was important to keep the proper order.

In your case, you can use select all (Command+A), then ResetPara to remove the frames (Command+Option+Q).

You'll have to re-format the document though (Best define a few styles for headings, main text, ..., and apply them).

OmniPage positioned nearly every paragraph in a separate frame (say, centered paragraphs in centered frames, indented paragraphs in frames with some distance from the left page boundary, ...), so you loose quite a bit of formatting when you remove the frames.
<rant>I wished Caere/OmniPage would hire someone who knows about (Word) styles!</rant>

Regards,
Klaus
 
J

jimahon

Many thanks Klaus I was looking at starting some fresh typing. That
would have taken me some time. So I really apprciate the advice. And I
learned a new word command. Thanks again for the help.

Monte
 
C

Clive Huggan

Many thanks Klaus I was looking at starting some fresh typing. That
would have taken me some time. So I really apprciate the advice. And I
learned a new word command. Thanks again for the help.

Monte
Here's another command that you'll find useful as a precursor to formatting
text from OmniPage Pro: select the text and key Control-Spacebar. This
strips all manually applied formatting (of which there is oodles in OmniPage
Pro) down to the characteristics of the underlying style (i.e., Normal
before you start re-formatting). So all those odd sizes, fonts, emboldening
etc are stripped back.

Cheers,

Clive Huggan
Canberra, Australia
(My time zone is at least 7 hours different from the US and Europe, so my
follow-on responses to those regions can be delayed)
============================================================

* A SUGGESTION ‹ WAIT FOR CONSIDERED ADVICE: If you post a question, keep
re-visiting the newsgroup for several days after the first response comes
in. Sometimes it takes a few responses before the best or complete solution
is proposed; sometimes you'll be asked for further information so that a
better answer can be provided. Good tips about getting the best out of
posting are at http://word.mvps.org/FindHelp/Posting.htm (if you use Safari
and it gives you a blank page the first time, you may need to hit the
circular arrow icon -- "Reload the current page" -- a few times).

* AND ONE MORE ‹ AVOID SPAM: To avoid spam directed at contributors of
newsgroups, you can set up a "send-only" dummy e-mail account. Full
instructions are at http://www.entourage.mvps.org/tips/tip019.html

============================================================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top