Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 07-07-2016, 06:29 PM
Irene H Irene H is offline Looping through word and writing to excel when certain conditions are met Windows 10 Looping through word and writing to excel when certain conditions are met Office 2016
Novice
Looping through word and writing to excel when certain conditions are met
 
Join Date: Jul 2016
Posts: 3
Irene H is on a distinguished road
Default Looping through word and writing to excel when certain conditions are met

Apologies up front if this has been answered in a previous post, however I've been looking for a number of days now and haven't been able to solve my problem.

I have a macro which loops through all paragraphs in a word document.

While it loops through, it evaluates the font style, and updates a number of variables which will be passed to excel when a condition is met (para.style = normal). I then want to take the variables and write them to a new row in excel. It then goes back to the word document and resumes looping through the paragraphs until the condition is next met.



When I was first writing the code, I was using an earlier OS and version of office, and the existing code worked to completion and the excel worksheet was fully populated with the full content of the word Document.

When I tried to run the code on my machine (which I use more often than not) and start handling other issues (tables), the macro worked to the point of creating the first row in excel, but when it came to writing the next (and subsequent rows), it doesn't appear to activate the worksheet.

I have attached the code and the target xls sheet. I'd be appreciative if anyone can steer me in the right direction.
Attached Files
File Type: xlsx Derived Requirement and Test Spec Template.xlsx (11.4 KB, 11 views)
File Type: txt word vba horvat thread 1.txt (6.3 KB, 12 views)
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel Formula for Multiple Conditions & Results nowco Excel 4 03-16-2016 11:24 AM
Writing PDF from Mac Word dickmill Word 0 01-13-2016 08:17 AM
Looping through word and writing to excel when certain conditions are met Generating Multiple Word Docs from Master Depending on Conditions ljg713 Word VBA 6 12-09-2015 03:23 PM
Looping through word and writing to excel when certain conditions are met How to stop MS word writing in margin gerretw Word 2 02-05-2013 07:01 AM
Looping through word and writing to excel when certain conditions are met Replacing cells in Excel-Very basic with minor conditions mag Excel 1 10-26-2012 10:59 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:00 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