PDA

View Full Version : Solved: Help selecting text box to search in



markh1182
06-26-2007, 08:24 AM
Hi, Please see attached file.

I am trying to select the text box embedded in the footer of page 2 of this document so I can then use find & replace to search for text of Law Society.

I am unable to find the name of this box, all I know is it is added when you select an autotext entry called _BackFooter.

Any help would be much appreciated.

fumei
06-27-2007, 09:32 AM
1. There is no AutoText in your document, as AutoText entries are not IN documents. They are in the template. So we can not see your AutopText.

2. What does show is a path in a field in the footer. We can not see your textbox.

3. It does not have a name. It will be a InlineShape, or possibly a Shape. You can select it using either of those - or rather, using whichever is the one that is appropriate. If it is an InlineShape...use InlineShape. If it is a Shape, use Shape.

You are also have the Section set for DifferentFirstPage. Therefore there are two distinct footers.

You can not access Selection of it without changing the View. Since I rarely do this, I suggest you record a macro opening the View to each footer, then using Selection to select the Shape. It is, BTW, a Shape, not an InlineShape, as ActiveDocument.Sections(1) _
.Footers(wdHeaderFooterPrimary).Shapes.Countreturns 1. The Primary footer has one Shape.

So:' code to change View
ActiveDocument.Sections(1) _
.Footers(wdHeaderFooterPrimary).Shapes(1).Select
' code using SelectionRepeat for Footers(wdHeaderFooterFirstPage).

Or, make a Footer object, a Shape object, and loop through all the footers.

markh1182
06-28-2007, 01:10 AM
Thanks for the answer