home *** CD-ROM | disk | FTP | other *** search
- Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
- Path: sparky!uunet!paladin.american.edu!auvm!SEHHS.BITNET!STSK
- Original_To: JNET%"win3-l@uicvm"
- Original_cc: STSK
- Message-ID: <WIN3-L%93012608223114@UICVM.CC.UIC.EDU>
- Newsgroups: bit.listserv.win3-l
- Date: Tue, 26 Jan 1993 15:19:00 N
- Sender: Microsoft Windows Version 3 Forum <WIN3-L@UICVM.BITNET>
- From: Sune Karlsson <STSK@SEHHS.BITNET>
- Subject: Re: How to find a frame in Winword
- Lines: 25
-
- The following WordBasic macro should be able to locate the frames
- in your document. It uses the WordBasic command CommandValid and the
- fact that you can only format a Frame while you are in it to determine
- if you are in a frame or not. With a long document this is probably
- pretty slow, but it will find all the frames!
- To speed things up you could replace "CharRight" with "LineDown" but
- this way you might miss some frames.
-
-
- Sub Main
-
- While CommandValid("FormatFrame") <> - 1 And CmpBookmarks("\Sel",
- "\EndOfDoc") > 0
- CharRight
- Wend
- If CommandValid("FormatFrame") Then
- MsgBox "In Frame!"
- ElseIf CmpBookmarks("\Sel", "\EndOfDoc") = 0 Then
- MsgBox "No Frame found!"
- EndIf
-
- End Sub
-
- Hope this helps
- Sune
-