Results 1 to 4 of 4

Thread: Code Mod to prevent further .Replacement.Text over complete Document.

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    10,457
    Rep Power
    10
    Quote Originally Posted by DocAElstein View Post
    .......... I wanted to modify the code so that it does not ask me if I want to continue doing the replacement for the whole WORD document BUT ALSO that it does not then actually do that.
    . I did try the Application.DisplayAlerts = False Application.DisplayAlerts = True Pair. This did prevent me being asked, BUT then the code goes on to do the replacement across the whole WORD Document. ( Which I do not want )
    ......
    Hi
    _~~~~~I think I have the answer to this now
    _~~~~~I got it along the way when asking a similar question here:
    Eileen's Lounge • View topic - Word VBA Replace multiple Spaces in Text with BB Code String


    _~~~~~~I think I was close, It all lies on this bit , the Wrap Property


    _~~~~~~~~~~~~~.Wrap


    _~~~~~~With hind sight if I goggle that you soon see what it is about.
    _~~~If you leave it out..~~( or have~~~~~~~.Wrap = wdFindAsk~~~~and have the Application.DisplayAlerts = False / Application.DisplayAlerts = True pair )..~~~then the code will go on to find and replace over the whole document
    _~~~~~~For what i wanted, I simply need this

    ~~~~~~~~~~~.Wrap = wdFindStop




    _ Thanks anyway for anyone that looked in.
    _ Alan
    Last edited by DocAElstein; 03-02-2016 at 05:38 PM.

Similar Threads

  1. Replies: 2
    Last Post: 01-27-2015, 08:29 PM
  2. Replies: 0
    Last Post: 01-24-2015, 03:50 PM
  3. Replies: 1
    Last Post: 08-21-2014, 12:16 AM
  4. Replies: 2
    Last Post: 06-08-2013, 09:32 PM
  5. Replacement for TreeView
    By Rasm in forum Excel Help
    Replies: 2
    Last Post: 11-26-2011, 08:20 PM

Posting Permissions

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