Secret sauce that brings YouTube followers, views, likes
Get Free YouTube Subscribers, Views and Likes

Use Excel data to populate a template in Word

Follow
Barb Henderson

Use Excel data to populate a template in Word. Create form letters from data listed in Excel. Check out my free templates and templates with code are available for purchase for $50 USD
https://www.easyexcelanswers.com/temp...
Check out my online training www.easyexcelanswers.com/courses.html
Are you struggling to update your Microsoft SQL Server data?
I recommend using wellknown Excel to update and manage your data in SQL Server using the SQL Spreads Excel addin.
Click https://sqlspreads.com/?pid=barbhende... to find out how SQL Spreads works best for nontechnical end users and download our free 14day trial. You will get two months free when purchasing an annual subscription using our link.

For more help visit my website www.easyexcelanswers.com or email me at [email protected].

Contact me regarding customizing this template for your needs.

Click for online Excel Consulting http://www.calendly.com/easyexcelanswers

I am able to provide online help on your computer at a reasonable rate.

https://www.amazon.com/shop/barbhende...

I use a Blue condenser Microphone to record my videos, here is the link
https://amzn.to/37gyyGa

Check out Crowdcast for creating your webinars
https://app.linkmink.com/a/crowdcast/83

If you need to buy Office 2019 follow
https://amzn.to/2VX5dv8

I use Tube Buddy to help promote my videos
Check them out
https://www.Tubebuddy.com/easyexcelan...

Follow me on Facebook
  / easyexcel.answers  

TWEET THIS VIDEO    • Use Excel data to populate a template...  

Follow me on twitter
easyexcelanswers

IG @barbhendersonconsulting

You can help and generate a translation to you own language
http://www.youtube.com/timedtext_cs_p...

*this description may contain affiliate links. When you click them, I may receive a small commission at no extra cost to you. I only recommend products and services that I've used or have experience with.

templates including code are available for $50 USD

How to insert VBA code in Excel
   • How to insert VBA code in Excel  

code
Sub ReplaceText()
Dim wApp As Word.Application
Dim wdoc As Word.Document
Dim custN, path As String
Dim r As Long
r = 2
Do While Sheet1.Cells(r, 1) (not equal to) ""
Set wApp = CreateObject("Word.Application")

wApp.Visible = True


Set wdoc = wApp.Documents.Open(Filename:="C:\Users\screa\OneDrive\reconstructionBH\Documents\Excel\welcome.dotx", ReadOnly:=True)
With wdoc
.Application.Selection.Find.Text = "||name||"
.Application.Selection.Find.Execute
.Application.Selection = Sheet1.Cells(r, 1).Value
.Application.Selection.EndOf

.Application.Selection.Find.Text = "||address||"
.Application.Selection.Find.Execute
.Application.Selection = Sheet1.Cells(r, 2).Value
.Application.Selection.EndOf

.Application.Selection.Find.Text = "||city||"
.Application.Selection.Find.Execute
.Application.Selection = Sheet1.Cells(r, 3).Value
.Application.Selection.EndOf

.Application.Selection.Find.Text = "||postal code||"
.Application.Selection.Find.Execute
.Application.Selection = Sheet1.Cells(r, 4).Value
.Application.Selection.EndOf

.Application.Selection.Find.Text = "||name||"
.Application.Selection.Find.Execute
.Application.Selection = Sheet1.Cells(r, 1).Value
.Application.Selection.EndOf

custN = Sheet1.Cells(r, 1).Value
path = "C:\Users\screa\OneDrive\Desktop\invoices\"
.SaveAs2 Filename:=path & custN, _
FileFormat:=wdFormatXMLDocument, AddtoRecentFiles:=False
End With
r = r + 1
Loop

End Sub

posted by citologakb