A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Word » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Searching for text boxes



 
 
Thread Tools Display Modes
  #21  
Old December 23rd, 2009, 09:24 AM posted to microsoft.public.word.docmanagement
Chad Williams[_2_]
external usenet poster
 
Posts: 17
Default Searching for text boxes

Hi Graham... thanks for the offer, but I can't send documents from the firm
that I work for to outsiders. However, I will create a document with boxes
in it and send it to you this Saturday or Sunday. Thanks again... and have a
Merry Christmas! Chad.

"Graham Mayor" wrote:

As I offered a few days ago, if you send me a sample of the document, I will
see what needs to be done to locate the boxes it contains.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



"Chad Williams" wrote in message
...
Thank you Suzanne and thank you Peter. Sorry, I thought I was clear and
now
I see the problem. Well, I simply would like a macro (if you can do it)
to
search for the next text box in the document and have the cursor bring me
to
that text box and then stop. Then, at that point, I would determine what
I
want to do with that text box. Then, I want to run the macro again from
where my cursor is (at that point I would place it after the first text
box)
and then have the macro take my cursor to the next text box and stop. And
so
forth. (If you can do another macro for frames, that would be an added
bonus.) But it's more the text box search that I would love to have. And
I'm praying that I have been more clear here than previously. Thank you.
Chad.

"Suzanne S. Barnhill" wrote:

Peter was pointing out that you didn't say why you wanted to search for
text
boxes. A little more detail would have helped us fine-tune our advice
because some of the questions that come up are, for example, "Are these
really text boxes, or might they be frames instead?" and "Do you want to
find them in order to delete them entirely, or do you want to preserve
their
content but remove it from the text boxes and then delete the text
boxes?"
and "Do you want to find the text boxes in order to apply some sort of
consistent formatting?" And so on.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org

"Chad Williams" wrote in message
news I honestly thank you for your help, Peter. Maybe you didn't read my
very
first post where I simply was asking for help in how to simply search
for
text boxes within a document, in the same way you would search for a
word.
I
never really specified the reason. Maybe you came in later in the
thread.
But I do appreciate your help and anyone's help here. As you know,
there's a
lot to know when it comes to heavy-duty Word document work. Chad.

"Peter T. Daniels" wrote:

Note that in none of your responses have you said what you actually
want to _do_ with each of the text boxes! If you reveal that
information, someone like Graham might be able to create a macro that
does it. (Once you seemed to indicate that you want to convert boxed
text to plain text, which is what my procedure will do.)

On Dec 18, 4:10 am, Chad Williams
wrote:
Thank you Peter, but that's not what I want. I just want to be able
to
go
from one text box to another. "Ctrl-A, Ctrl-Q" doesn't do that.
But I
do
appreciate your trying to help.



"Peter T. Daniels" wrote:
A while ago, I exported some text from a pdf into a Word file, and
a
lot of it was in text boxes (or maybe frames), and someone here
suggested Ctrl-A, Ctrl-Q. It worked.

On Dec 17, 10:42 pm, Chad Williams
wrote:
Graham, thanks for your response.

Actually, I simply want to find all the text boxes and then
delete
them. A
lot of the times they are in footers, as well. Being able to
search for text
boxes, the same way you can search for, say, any word or any
style
would be
so helpful. I know that you can search for graphics in a
document.
I wonder
why an option for searching for text boxes isn't also available?
Anyhow, I
guess I'll just have to live with it as is.

"Graham Mayor" wrote:
It might be simpler with an application that formats with text
boxes to scan
to plain text (which does not support then) and add your own
formatting - or
to use an OCR software package that does not use text boxes
such
as
FineReader. Doesn't OmniPage have an option not to use text
boxes?
Attempting to remove the formatting by simply removing the
text
boxes (which
may not be text boxes but frames) will result in a hell of a
lot
of work and
cannot readily be achieved with a macro.

--

Graham Mayor - Word MVP

My web sitewww.gmayor.com
Word MVP web sitehttp://word.mvps.org


"Chad Williams" wrote
in
message
news Hi Doug. Thanks again for the effort. I used the macro you
put here...
but
it's the same problem. It does find the first text box.
Then
I move the
cursor after that first text box and hit "Alt+F8" "Run" and
that's where
the
snag is. It doesn't take me to the next text box. It takes
me
to the
last
text box. And actually it doesn't take me anywhere... in
other
words, the
cursor simply disappears. I then click on the page where I
am
and hit
"Shift
F5" to go to the previous location -- this was my workaround
to
find where
the cursor was last.... and that's when it takes me to the
last
text box.
I
wish the macro simply took me to the text boxes in the order
that they are
in
the document. Any further tweaking of that macro would be
helpful.
Thanks.
Chad.

"Doug Robbins - Word MVP" wrote:

The following might work for you

Dim i As Long
Dim myrange As Range
Set myrange = Selection.Range
myrange.End = ActiveDocument.Range.End
With myrange
If .ShapeRange.Count 0 Then
For i = 1 To .ShapeRange.Count
If .ShapeRange(i).Type = msoTextBox Then
.ShapeRange(i).Select
MsgBox "The selected shape is a text box."
Exit Sub
End If
Next i
End If
End With

You will have to move the selection out of the text box
before
running it
again and it will only pick up one shape per shape anchor
location.

--
Hope this helps,

Doug Robbins - Word MVP

Please reply only to the newsgroups unless you wish to
obtain
my services
on
a paid professional basis.

"Chad Williams"
wrote
in message
...
Doug, here's the problem. I have to convert huge
documents
from pdf
into
Word. I use Omni pro and the document ends up with many
many text
boxes
and
I want to be able to search for them going down the
document
from one
to
the
next, in the same way that you would search for any word.
The macro
you
gave
me here did work. It would take me to a text box. But
it
kept going
back
to
the same box. I want the macro to search for the first
text
box and
then,
when I run the macro again from that point, I want it to
go
to the next
text
box. It wasn't doing that. I don't know if that's the
fault of the
macro
or
of my ignorance in using it.

Thanks,
Chad.

"Doug Robbins - Word MVP" wrote:

I did test the macro before I sent it. Exactly what
type
of Text
boxes
are
you talking about? How were they inserted into the
document?

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail
yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via
msnews.microsoft.com

"Chad Williams"
wrote in
message
...
Doug, thanks again for your reply. I read the article
and I was
able
to
figure it out. However, I created a document with 20
boxes. The
search
macro that is listed here doesn't take me from box to
box. Is that
the
fault
of the macro? Could you try a simple test and let me
know please?
Thank
you. Chad.

"Doug Robbins - Word MVP" wrote:

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:10 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.