+ Reply to Thread
Results 1 to 2 of 2

Use excel's VB to find/replace empty lines in Word 2016

  1. #1
    Registered User
    Join Date
    10-11-2018
    Location
    Amsterdam
    MS-Off Ver
    2016
    Posts
    2

    Use excel's VB to find/replace empty lines in Word 2016

    Dear all,

    I'm using some templates to generate/create documents for projects. Since I have a lot of variables being searched and replaced I want to remove empty lines. My code is as fellow:

    2018-10-11 12_14_12-Microsoft Visual Basic for Applications - Engineering V4.36.xlsm - [Module37.jpg

    Can anyone help me by deleting empty lines?

  2. #2
    Forum Expert
    Join Date
    06-26-2010
    Location
    Austin, TX
    MS-Off Ver
    Excel 2010
    Posts
    1,673

    Re: Use excel's VB to find/replace empty lines in Word 2016

    I haven't done this in VBA but the technique should be similar. You want to look for two carriage returns in a row, and then replace them with one carriage return. For Word's find and replace, I believe a carriage return is ^p.
    Pauley
    --------
    If I helped with your issue, I'd appreciate a rep bump (hit the '*' icon to the bottom left of this post).

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Excel 2016 issues: Adding sheets and find replace.
    By anrichards22 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-25-2016, 07:25 AM
  2. Replies: 3
    Last Post: 11-25-2014, 06:08 AM
  3. [SOLVED] Excel macro- Find replace an itallic font word with a regular word?
    By thisisaboutwork in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-08-2013, 01:48 PM
  4. [SOLVED] Find in Excel and Replace in Word
    By pradeepdeepu_001 in forum Word Formatting & General
    Replies: 2
    Last Post: 01-30-2013, 03:22 AM
  5. Need help with Excel-to-Word find and replace macro based on word filename
    By EnterTheSerpent in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-16-2013, 12:48 PM
  6. find in excel replace in word: find/replace text in text boxes and headers
    By dean.rogers in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-10-2012, 12:40 PM
  7. [SOLVED] Word Find and Replace from Excel VBA
    By Neopergoss in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-03-2012, 10:56 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1