none
For a Word VBA Macro, how do I surpress the Inout box that appears after a Find & Replace asking if I want to search from the beginning? RRS feed

  • Question

  • For a Word VBA Macro, how do I supress the Inout box that appears after a Find & Replace asking if I want to search from the beginning?

    I do not want to search from the beginning nor do I want the Macro user to have to bother with this.  I want the macro just to continue.

    What code can I add to surpass this as shown below?


    Lewis D. Eigen


    • Edited by LDEigen Tuesday, April 17, 2018 3:56 PM
    Tuesday, April 17, 2018 3:55 PM

Answers

  • Set the Wrap property of the Find object to wdFindStop:

        With Selection.Find
            .ClearFormatting
            .Text = "Something"
            .Wrap = wdFindStop
            ...
            .Execute
        End With


    Regards, Hans Vogelaar (http://www.eileenslounge.com)

    Tuesday, April 17, 2018 4:29 PM
  • Hi LDEigen,

    You had mentioned that,"I have looked for the place where I can so mark the issue as solved, but I cannot find it"

    You can see it just below the reply. like you can see in n image below.

    Regards

    Deepak


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by LDEigen Thursday, April 19, 2018 1:50 AM
    Thursday, April 19, 2018 1:12 AM
    Moderator

All replies

  • Set the Wrap property of the Find object to wdFindStop:

        With Selection.Find
            .ClearFormatting
            .Text = "Something"
            .Wrap = wdFindStop
            ...
            .Execute
        End With


    Regards, Hans Vogelaar (http://www.eileenslounge.com)

    Tuesday, April 17, 2018 4:29 PM
  • Thanks so much.  I had always wondered what that "Wrap" concept was all about.  Now I have a start and I will find out more, but this certainly solves my problem.  I much appreciate your help.

    Lewis D. Eigen

    Wednesday, April 18, 2018 5:16 AM
  • Hi LDEigen,

    From your last post, I can see that your issue is solved from the suggestion given by Hans Vogelaar MVP.

    You did not mark the answer.

    As a result, This thread is still open.

    I suggest you to mark the suggestion given by Hans Vogelaar MVP as an answer.

    It will help us to close this thread on our side, It will be helpful to other community members in future too.

    Thanks for your understanding.

    Regards

    Deepak


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, April 18, 2018 6:22 AM
    Moderator
  • I have looked for the place where I can so mark the issue as solved, but I cannot find it.  In the Microsoft Community, it is right there with the Reply control.  Where is it <g class="gr_ gr_133 gr-alert gr_gramm gr_inline_cards gr_run_anim Grammar multiReplace" data-gr-id="133" id="133">in</g> this forum?

    Lewis D. Eigen

    Wednesday, April 18, 2018 4:59 PM
  • Hi LDEigen,

    You had mentioned that,"I have looked for the place where I can so mark the issue as solved, but I cannot find it"

    You can see it just below the reply. like you can see in n image below.

    Regards

    Deepak


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by LDEigen Thursday, April 19, 2018 1:50 AM
    Thursday, April 19, 2018 1:12 AM
    Moderator
  • Thanks, I had been looking for a rating system like the 5 stars on the Microsoft Community and didn't realize that this was just a toggle.  It is covered now and I will have this problem no longer.

    Lewis D. Eigen

    Thursday, April 19, 2018 1:52 AM