Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / March 2007

Tip: Looking for answers? Try searching our database.

Search for textboxes

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
andreas - 17 Mar 2007 08:40 GMT
I recently moved a text box around in a word file and somehow it
disappeared. Can I ask Word to search for text boxes in a document via
VBA?

Help is appreciated.  Thank you very much in advance.

Regards,

Andreas
Jezebel - 17 Mar 2007 09:16 GMT
Textboxes are in the Shapes collection. Since this is just a one-off, you
can probably find it using these commands in the commands in the Immediate
window --

? ActiveDocument.Shapes.Count            to find out how many shapes there
are (not just text boxes)

and

ActiveDocument.Shapes(n).Select            to select the nth shape ... just
work your way through from 1 to however many there are until you find your
missing one.

>I recently moved a text box around in a word file and somehow it
> disappeared. Can I ask Word to search for text boxes in a document via
[quoted text clipped - 5 lines]
>
> Andreas
Klaus Linke - 17 Mar 2007 12:30 GMT
ActiveWindow.ScrollIntoView Selection.Range, True

...might also come in useful, because Word won't necessarily scroll a Shape
into view automatically when you select it.

Regards,
Klaus

> Textboxes are in the Shapes collection. Since this is just a one-off, you
> can probably find it using these commands in the commands in the Immediate
[quoted text clipped - 18 lines]
>>
>> Andreas
andreas - 17 Mar 2007 15:32 GMT
>    ActiveWindow.ScrollIntoView Selection.Range, True
>
[quoted text clipped - 28 lines]
>
> - Zitierten Text anzeigen -

Good advice, thank you.
Regards,

Andreas
andreas - 17 Mar 2007 15:31 GMT
> Textboxes are in the Shapes collection. Since this is just a one-off, you
> can probably find it using these commands in the commands in the Immediate
[quoted text clipped - 20 lines]
>
> - Zitierten Text anzeigen -

ok, thank you Jezebel
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.