Search for a frame in Word?

C

Cheryl

Is it possible to search for a frame in Word? I tried
using ^g in Search/Replace, but it didn't find anything,
even though I know there are frames in the document.

Any help is greatly appreciated!
 
C

Cindy M -WordMVP-

Hi Cheryl,
Is it possible to search for a frame in Word? I tried
using ^g in Search/Replace, but it didn't find anything,
even though I know there are frames in the document.
A frame, unlike a Textbox, is not a graphical object. As
far as I know, there's no particular command in Find that
will locate a frame (although it will find things within
frames with no problems).

You could use a macro, such as the following, to "go to"
the next frame in a document

Sub GoToNextFrame()
Dim iFrameIndex As Long
Dim iNrFrames As Long
Dim rng As Word.Range
Dim doc As Word.Document

Set doc = ActiveDocument
Set rng = Selection.Range
rng.Start = doc.Range.Start
iNrFrames = rng.Frames.Count
If doc.Frames.Count = 0 Then
MsgBox "There are no frames in this document"
Exit Sub
ElseIf doc.Frames.Count <= iNrFrames Then
iFrameIndex = 1
Else
iFrameIndex = iNrFrames + 1
End If
doc.Frames(iFrameIndex).Select
End Sub

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update
Sep 30 2003)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any
follow question or reply in the newsgroup and not by e-mail
:)
 
K

Klaus Linke

Hi Cheryl,

Another option: I use frames mainly in conjunction with styles (say, a
"Picture" style to put pictures in a frame, or a "Marginalia" style to put
text in the margin).

It's then easy to search for those styles.

Regards,
Klaus
 

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