Results 1 to 2 of 2
  1. #1
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Frames procedures (Word97+)

    The procedures supplied allow the developer to:
    1. Count frames within a range
    2. Select the first frame in a range (GoTo)
    3. Select the last frame in a range (GoTo)
    4. Move forward one frame
    5. Move backward one frame
    6. Delete all frames within a range (except those frames that lie within tables).
    These procedures could form the basis of a GUI form similar to Word's Edit, Replace.
    Attached Files Attached Files

  2. #2
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Frames procedures (Word97+)

    Here is a crude attempt to circumvent the frame/table problem:<pre>Public Function DeleteFrames(rng As Range)
    Dim lng As Long
    For lng = rng.Frames.Count To 1 Step -1
    If rng.Frames(lng).Range.Information(wdWithInTable) Then
    ' MsgBox "I cannot delete frames within tables"
    Selection.Rows.ConvertToText Separator:=wdSeparateByTabs, NestedTables:=True
    rng.Frames(lng).Delete
    Selection.ConvertToTable Separator:=wdSeparateByTabs, Format:=wdTableFormatNone
    Else
    rng.Frames(lng).Delete
    End If
    Next lng
    End Function
    Sub TESTDeleteFrames()
    Call DeleteFrames(Selection.Range)
    End Sub
    </pre>


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •