+ Reply to Thread
Results 1 to 3 of 3

Looping through a word document

  1. #1
    Registered User
    Join Date
    MS-Off Ver

    Looping through a word document


    Im trying to fix my word document's empty paragraphs with VBA. The issue is that i have pages with paragraphs that have a font.size = 11. I need to change these paragraphs to font.size = 10.
    So i need a loop that starts from the beginning of the document, iterates through the paragraphs and searches If paragraph is empty AND font.size = 11 then Font.Size 10.

    I keep getting an errors and not quite sure if im trying to do the right thing. Any help?

    Please Login or Register  to view this content.
    Last edited by Pepe Le Mokko; 03-29-2020 at 07:11 AM.

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    MS-Off Ver
    Excel 2010 on Linux - O365

    Re: Looping through a word document

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however you need to include code tags around your code.

    Please take a moment to add the tags. Posting code between tags makes your code much easier to read and copy for testing, and it also maintains VBA formatting.

    Please see Forum Rule #2 about code tags and adjust accordingly. Click on Edit to open your post, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    I did it for you this time. Please read forum rules. Thanks

  3. #3
    Forum Expert
    Join Date
    drevni ruchadlo
    MS-Off Ver

    Re: Looping through a word document

    Quote Originally Posted by Carlsberg789 View Post
    ... trying to fix my word document's ...
    And what does this have to do with Excel ?
    You write in the section dedicated to the Excel program ... "Excel Programming / VBA / Macros"

+ 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. Populating DocProperty fields in second Word Document from current document
    By AndyE in forum Word Programming / VBA / Macros
    Replies: 1
    Last Post: 11-08-2018, 06:09 PM
  2. [SOLVED] How to email word document as an attachment with filename taken from text in document
    By laxminarayana in forum Word Programming / VBA / Macros
    Replies: 7
    Last Post: 03-08-2018, 04:46 PM
  3. Replies: 2
    Last Post: 04-19-2013, 07:02 AM
  4. VBA - Create Word Document or Edit Document if exists
    By unstable81 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 01-11-2013, 08:27 AM
  5. Add text to Existing Word Document if it Doesn't exist create Word Document
    By unstable81 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 01-10-2013, 12:15 AM
  6. Looping through an Excel list to generate a dynamic Word document
    By Nabla21 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 03-30-2011, 09:25 AM
  7. [SOLVED] Changing a Word Document to a CSV Formated Document
    By Team1 in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 02-06-2006, 07:29 PM

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1