Consulting

Results 1 to 5 of 5

Thread: Macro to close Find and Replace dialog when a drag is started

  1. #1
    VBAX Regular
    Joined
    Mar 2016
    Posts
    12
    Location

    Macro to close Find and Replace dialog when a drag is started

    In Word 2007, if the Find and Replace dialog is open, text can't be dragged/dropped. So I have to close the dialog first, then do the dragging. This has been an annoyance through many versions of Word.

    I'd like to write a macro that would detect when selected text has begun to be dragged, and close the Find/Replace dialog in time to allow the drag/drop to proceed.

    Has anyone an idea of what VBA terms would apply to this situation? (Or, for that matter, whether I'm dreaming the impossible dream.)

  2. #2
    Microsoft Word MVP 2003-2009 VBAX Guru gmaxey's Avatar
    Joined
    Sep 2005
    Posts
    3,340
    Location
    I believe you are dreaming. There is no StartDrag event. Why do you leave the find and replace dialog displayed in the first place?
    Greg

    Visit my website: http://gregmaxey.com

  3. #3
    VBAX Regular
    Joined
    Mar 2016
    Posts
    12
    Location
    Quote Originally Posted by gmaxey View Post
    I believe you are dreaming. There is no StartDrag event. Why do you leave the find and replace dialog displayed in the first place?
    Thanks for your answer, gmaxey. I'm doing freelance copyediting of manuscripts that require lots of search/replace operations, so I just leave the F/R dialog open on my second monitor for convenience. The drag prevention isn't a big issue for most users, but time is money. . . .

    Hmmm. . . I wonder whether there's some way to intercept the several Find/Replace dialog boxes (item not found, reached the end of the document, etc.) and substitute my own db, where OK would close the db, but Close FR Box would close both boxes?

  4. #4
    Microsoft Word MVP 2003-2009 VBAX Guru gmaxey's Avatar
    Joined
    Sep 2005
    Posts
    3,340
    Location
    Maybe you could do make a list of your Find and Replace requirements and do them all at one time.

    http://gregmaxey.mvps.org/word_tip_p...d_replace.html
    Greg

    Visit my website: http://gregmaxey.com

  5. #5
    VBAX Regular
    Joined
    Mar 2016
    Posts
    12
    Location
    Quote Originally Posted by gmaxey View Post
    Maybe you could do make a list of your Find and Replace requirements and do them all at one time.
    Thanks for the link, gmaxey; I've installed the add-in you linked to, and I'm testing its usefulness for my situation.

Tags for this Thread

Posting Permissions

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