Using Word 2007, Need to move an Active X control relative to a selected bookmark .... HELP RRS feed

  • Question

  • I have created a bunch of bookmarks in a reference document I use frequently.  I populate a combobox with the bookmarks, then use the combobox to travel to the bookmarks.  Problem is I have to go back up through the document to back to my combobox. 

    I'd like to:

    1. Create a combobox in the ribbon that I can populate when the document opens then navigate from there.  I havent been able to succesfully do this. Not sure if I am company restricted for this installation or if I'm doing it wrong.

    2. Write some code to continously while I navigate the document. 

    ... Here is the code I use to populate the combobox (cboQuickLink). Please, no comments on my use of "function" ...

    Public Function ListBookMarks()
        Dim bm

        For Each bm In ActiveDocument.Bookmarks
            If Left(.Bookmarks(bm).Name, 2) = "QL" Then
                .cboQuickLink.AddItem .Bookmarks(bm).Name
           End If
    End Function

    I dont have any code for moving the combobox around. nothing I've tried has worked outside the page it is located on ...

    for the purposes of this question, solution2, I need to move the combobox 6 pages down vertically, no movement horizontally.

    Thanks in advance!!


    /r Bill

    Monday, February 27, 2012 5:10 PM


  • Hello Bill,

    You can use the Selection object to move the combobox's position:

    Sub Macro3()
    ' Macro3 Macro
    Selection.TypeText Text:=vbTab
    End Sub

    Hope this helps.

    Best Wishes,

    Be kind to help others, and others also are kind to help me. ^_^

    • Marked as answer by Bruce Song Thursday, March 8, 2012 10:09 AM
    Friday, March 2, 2012 8:43 AM