Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 07-25-2023, 06:04 AM
BrianHoard BrianHoard is offline Creating a Word document from Excel data Windows 10 Creating a Word document from Excel data Office 2019
Advanced Beginner
Creating a Word document from Excel data
 
Join Date: Jul 2022
Location: Haymarket, VA USA
Posts: 85
BrianHoard is on a distinguished road
Default Creating a Word document from Excel data

I'm sure this has been asked before, but I am not finding a solution searching this forum. I have been writing several Word VBA scripts in Word 2019, but this is the first time using Excel in a script. Here is my goal:


I make edits to the Excel file, and run the script. Not sure if it should be done from Excel or Word? I want to run some logic on the data to determine the number of days between todays date and the start date, which will be written in the Word document as Project Age.
I would like the script to loop through each row in Excel, and if the first column is "include", to include that row in the Word document, otherwise, skip that row. And format the text like the attached Word doc.
I'm also attaching a dummy Excel file for reference if anyone can get me started on the right track.
Attached Images
File Type: jpg excelWordSnap.jpg (144.4 KB, 12 views)
Attached Files
File Type: xlsx excelSample.xlsx (11.2 KB, 7 views)
File Type: docx sampleWordDoc.docx (14.5 KB, 6 views)
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Error 5941 Creating a new word document from Excel Kent Burel Word VBA 1 06-14-2020 01:35 PM
Creating a Word document from Excel data Word slow to open when creating new document from Excel Wojix Word 6 08-29-2018 03:33 PM
Creating a Word document from Excel data Creating a letter in Word, with text pulled from an Excel document based on selections in a userform TMAL Word VBA 6 12-15-2017 02:16 PM
Creating a Word document from Excel data Creating Standard Word document using excel source(s) MagicMan Word VBA 1 12-01-2017 05:06 PM
Creating a table in one document of WORD from EXCEL with Mail Merge Joseph.Comerford@bentley. Mail Merge 1 04-18-2015 01:19 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:49 AM.


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