Results 1 to 5 of 5
  1. #1
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    EditGoTo Dialog Box (Eng/Word2K/SR-1a)

    I'm using a macro to bring up the EditGoTo dialog box, so that the entry in the "enter page/section/etc.number" is selected. i.e. I don't have to erase the previous entry each time. Otherwise, if you close the GoTo dialog box & then reopen it, the cursor is just before the previous number that was entered. I use:<pre> With Dialogs(wdDialogEditGoTo)
    .Destination = ""
    .Show
    End With</pre>


    However, there are three problems with the dialog box that comes up:
    1. It's non modal (modeless??), so I can't switch between the main document & the dialog box.
    2. I can't use the extend mode with it.
    3. If I bring it up first, the Find/Replace tabs are greyed out (this is very minor).

    Is there a way that I can either make the original EditGoTo dialog box select the number that I type or can I modify the EditGoTo macro above to solve the first two problems.

    Thanks for any ideas.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: EditGoTo Dialog Box (Eng/Word2K/SR-1a)

    Phil,

    I don't know of a "good" way to do what you want, but if you trust SendKeys, you can open the regular dialog with

    SendKeys "%eg+{end}"

    This is equivalent to Alt+E (Edit menu), G (Go To...), Shift+End (select to end). Perhaps it can also be done with WordBasic commands, but I'm not familiar with that any more. Perhaps Klaus Linke has a suggestion.

  3. #3
    5 Star Lounger
    Join Date
    May 2001
    Location
    Stuttgart, Baden-W, Germany
    Posts
    931
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: EditGoTo Dialog Box (Eng/Word2K/SR-1a)

    Sadly, Klaus Linke hasn't.

    CommandBars.FindControl(ID:=757).Execute
    will show the dialog modal, and lets you switch to the "Find" and "Replace" tabs (and probably lets you use ExtendMode), but I don't see a way to remove the Destination.

    Some (probably terribly na

  4. #4
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: EditGoTo Dialog Box (Eng/Word2K/SR-1a)

    Hans:
    Thanks for the suggestion. I haven't had a chance to try it out, I would have thanked you earlier, but I thought I responded before. <img src=/S/doh.gif border=0 alt=doh width=15 height=15>

  5. #5
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: EditGoTo Dialog Box (Eng/Word2K/SR-1a)

    I think you need SendKeys to clean out the control. (Note: this does bad things if run with the editor open.)

    Sub MyEditGoto()
    SendKeys "{DEL}"
    CommandBars.FindControl(ID:=757).Execute
    End Sub

    I tried to find a way to do it with the Application.Browser object, but could not find a non-SendKeys way to display and manipulate it.

    Sub MyBrowserGoTo()
    Application.Browser.Target = wdBrowseGoTo ' Has no effect on the dialog
    SendKeys "%^{HOME}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{DOWN }{ENTER}+{END}{DEL}"
    End Sub

Posting Permissions

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