Results 1 to 2 of 2
  1. #1
    New Lounger
    Join Date
    Mar 2007
    Thanked 0 Times in 0 Posts

    Linking Text Boxes (2003 SP2)

    Hi Everyone

    I have a partially sighted student who needs to be able to link 2 text boxes together using the create textbox link tool. He is unable to use the mouse so he will need to use a keyboard short cut or menu option. Is this possible with creating a macro? I have had a play and a good search and I have not come up with anything.


  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Thanked 31 Times in 31 Posts

    Re: Linking Text Boxes (2003 SP2)

    The following macro will add a new text box linked to the currently selected one:

    Sub AddLinkedTextBox()
    Dim shp1 As Shape
    Dim shp2 As Shape
    Dim pg As Page

    If Not Selection.Type = pbSelectionShape Then
    Exit Sub
    End If

    If Selection.ShapeRange(1).HasTextFrame = False Then
    Exit Sub
    End If

    Set shp1 = Selection.ShapeRange(1)
    Set pg = shp1.Parent

    Set shp2 = pg.Shapes.AddTextbox _
    (msoTextOrientationHorizontal, _
    shp1.Left, shp1.Top + shp1.Height + 36, 288, 216)
    shp1.TextFrame.NextLinkedTextFrame = shp2.TextFrame
    End Sub

    If no text box is selected, the macro beeps and exits. Unfortunately, I don't think you can assign a keyboard shortcut to a macro.

Posting Permissions

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