Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 04-21-2018, 09:35 PM
WarPiglet WarPiglet is offline VBA find word and create numbered list under it Windows 7 64bit VBA find word and create numbered list under it Office 2010 64bit
Novice
VBA find word and create numbered list under it
 
Join Date: Apr 2018
Posts: 4
WarPiglet is on a distinguished road
Default Still not working

Thank for the attempt. The data that goes into this word document has hidden codes embedded that have given me issues with a lot of the coding I've done previously to this Assessments issue. I believe your code works; However, not for my purposes. The white space codes within the document are not standard and I cannot find them anywhere online to help me delete them. I believe these white spaces are causing an inaccurate word count. When I select Assessment and everything above it, I count 8369 characters. When I run the code you provided, it counts Assessment at 8535 over .Start and then 8561 over .MoveStart. This makes my data look like this...
1. Data
2. Data
3. Data
4.
5. Assessment
6. Data
7. Data
8. Data

Can you write me code that can do this...

assessmentLine = ??? 'Find the line number with the word Assessment: followed by a paragraph enter ^p.
i = assessmentLine + 1 'Assign line increment and start location.
c = 1 'Numbered list starts with 1 then increments in loop
Do Until myLine(i) = "" 'Loop until it finds a blank line.
myLine(i) = c & ". " & myLine(i) '1. Hypertension would be the first output.
c = c + 1
i = i + 1
Loop

I'm sure you programmers can understand the concept of the above.
Reply With Quote
 

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA find word and create numbered list under it First Item in a Word numbered list indents ernief Word 2 09-15-2019 06:07 PM
How to create a decimal point after each number in a numbered list in excel wondermuse Excel 1 03-06-2017 03:42 AM
VBA find word and create numbered list under it Word 2016 - Numbered List jthomas666 Word 2 06-16-2016 12:08 PM
Word Mixing Numbered Headings with Numbered List Tess0 Word 11 07-15-2014 05:25 AM
VBA find word and create numbered list under it How to create a automatically numbered list? three_jeeps Word 3 05-30-2013 10:53 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:29 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft