home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / bit / listserv / win3l / 12909 < prev    next >
Encoding:
Text File  |  1993-01-26  |  1.2 KB  |  38 lines

  1. Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
  2. Path: sparky!uunet!paladin.american.edu!auvm!SEHHS.BITNET!STSK
  3. Original_To:  JNET%"win3-l@uicvm"
  4. Original_cc:  STSK
  5. Message-ID: <WIN3-L%93012608223114@UICVM.CC.UIC.EDU>
  6. Newsgroups: bit.listserv.win3-l
  7. Date:         Tue, 26 Jan 1993 15:19:00 N
  8. Sender:       Microsoft Windows Version 3 Forum <WIN3-L@UICVM.BITNET>
  9. From:         Sune Karlsson <STSK@SEHHS.BITNET>
  10. Subject:      Re: How to find a frame in Winword
  11. Lines: 25
  12.  
  13. The following WordBasic macro should be able to locate the frames
  14. in your document. It uses the WordBasic command CommandValid and the
  15. fact that you can only format a Frame while you are in it to determine
  16. if you are in a frame or not. With a long document this is probably
  17. pretty slow, but it will find all the frames!
  18. To speed things up you could replace "CharRight" with "LineDown" but
  19. this way you might miss some frames.
  20.  
  21.  
  22. Sub Main
  23.  
  24. While CommandValid("FormatFrame") <> - 1 And CmpBookmarks("\Sel",
  25. "\EndOfDoc") > 0
  26.       CharRight
  27. Wend
  28. If CommandValid("FormatFrame") Then
  29.       MsgBox "In Frame!"
  30. ElseIf CmpBookmarks("\Sel", "\EndOfDoc") = 0 Then
  31.       MsgBox "No Frame found!"
  32. EndIf
  33.  
  34. End Sub
  35.  
  36. Hope this helps
  37. Sune
  38.